diff --git a/lib/functions/compilation/patch/kernel-bootsplash-and-drivers.sh b/lib/functions/compilation/patch/kernel-bootsplash-and-drivers.sh index 92d0654b9e..14c1d445d3 100644 --- a/lib/functions/compilation/patch/kernel-bootsplash-and-drivers.sh +++ b/lib/functions/compilation/patch/kernel-bootsplash-and-drivers.sh @@ -112,11 +112,12 @@ compilation_prepare() { if linux-version compare "${version}" ge 5.19.6 || (linux-version compare "${version}" ge 5.15.64 && linux-version compare "${version}" lt 5.16); then - process_patch_file "${SRC}/patch/misc/0001-Revert-fbdev-fbcon-Properly-revert-changes-when-vc_r.patch" "applying" + process_patch_file "${SRC}/patch/misc/bootsplash-5.19.y-Revert-fbdev-fbcon-release-buffer-when-fbcon_do_set.patch" "applying" + process_patch_file "${SRC}/patch/misc/bootsplash-5.19.y-Revert-fbdev-fbcon-Properly-revert-changes-when-vc_r.patch" "applying" fi process_patch_file "${SRC}/patch/misc/bootsplash-5.16.y-0000-Revert-fbcon-Avoid-cap-set-but-not-used-warning.patch" "applying" - process_patch_file "${SRC}/patch/misc/0001-Revert-fbcon-Fix-accelerated-fbdev-scrolling-while-logo-is-still-shown.patch" "applying" + process_patch_file "${SRC}/patch/misc/bootsplash-5.16.y-Revert-fbcon-Fix-accelerated-fbdev-scrolling-while-logo-is-still-shown.patch" "applying" process_patch_file "${SRC}/patch/misc/bootsplash-5.16.y-0001-Revert-fbcon-Add-option-to-enable-legacy-hardware-ac.patch" "applying" process_patch_file "${SRC}/patch/misc/bootsplash-5.16.y-0002-Revert-vgacon-drop-unused-vga_init_done.patch" "applying" process_patch_file "${SRC}/patch/misc/bootsplash-5.16.y-0003-Revert-vgacon-remove-software-scrollback-support.patch" "applying" diff --git a/patch/misc/0001-Revert-fbcon-Fix-accelerated-fbdev-scrolling-while-logo-is-still-shown.patch b/patch/misc/bootsplash-5.16.y-Revert-fbcon-Fix-accelerated-fbdev-scrolling-while-logo-is-still-shown.patch similarity index 100% rename from patch/misc/0001-Revert-fbcon-Fix-accelerated-fbdev-scrolling-while-logo-is-still-shown.patch rename to patch/misc/bootsplash-5.16.y-Revert-fbcon-Fix-accelerated-fbdev-scrolling-while-logo-is-still-shown.patch diff --git a/patch/misc/0001-Revert-fbdev-fbcon-Properly-revert-changes-when-vc_r.patch b/patch/misc/bootsplash-5.19.y-Revert-fbdev-fbcon-Properly-revert-changes-when-vc_r.patch similarity index 100% rename from patch/misc/0001-Revert-fbdev-fbcon-Properly-revert-changes-when-vc_r.patch rename to patch/misc/bootsplash-5.19.y-Revert-fbdev-fbcon-Properly-revert-changes-when-vc_r.patch diff --git a/patch/misc/bootsplash-5.19.y-Revert-fbdev-fbcon-release-buffer-when-fbcon_do_set.patch b/patch/misc/bootsplash-5.19.y-Revert-fbdev-fbcon-release-buffer-when-fbcon_do_set.patch new file mode 100644 index 0000000000..98e92d4153 --- /dev/null +++ b/patch/misc/bootsplash-5.19.y-Revert-fbdev-fbcon-release-buffer-when-fbcon_do_set.patch @@ -0,0 +1,28 @@ +From 729b2d566888ddc24edd9887098b80af3fc4269f Mon Sep 17 00:00:00 2001 +From: Igor Pecovnik +Date: Sat, 31 Dec 2022 14:27:32 +0100 +Subject: [PATCH] Revert "fbdev: fbcon: release buffer when fbcon_do_set_font() + failed" + +This reverts commit 88ec6d11052da527eb9268831e7a9bc5bbad02f6. +--- + drivers/video/fbdev/core/fbcon.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c +index df40360e04ff..1f37904b0405 100644 +--- a/drivers/video/fbdev/core/fbcon.c ++++ b/drivers/video/fbdev/core/fbcon.c +@@ -2462,8 +2462,7 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, int charcount, + + if (userfont) { + p->userfont = old_userfont; +- if (--REFCOUNT(data) == 0) +- kfree(data - FONT_EXTRA_WORDS * sizeof(int)); ++ REFCOUNT(data)--; + } + + vc->vc_font.width = old_width; +-- +2.34.1 +