[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20260105102834.359460-1-luogengkun@huaweicloud.com>
Date: Mon, 5 Jan 2026 10:28:34 +0000
From: Luo Gengkun <luogengkun@...weicloud.com>
To: b.zolnierkie@...sung.com
Cc: dri-devel@...ts.freedesktop.org,
linux-fbdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 5.10.y] fbcon: Fix the issue of uninitialized charcount in the remaining consoles
After commit 0998a6cb2326 ("fbdev: bitblit: bound-check glyph index in
bit_putcs*") was merged, using alt+ctrl+f1 to switch the tty from tty0 to
tty1 results in garbled display.
The reason is the vc->vc_font.charcount is 0, it is clearly an
uninitialized value. The mainline is fine because commit a1ac250a82a5
("fbcon: Avoid using FNTCHARCNT() and hard-coded built-in font charcount")
assigns the fvc->vc_font.charcount to vc->vc_font.charcount.
Cc: stable@...r.kernel.org
Signed-off-by: Luo Gengkun <luogengkun@...weicloud.com>
---
drivers/video/fbdev/core/fbcon.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 3dd03e02bf97..900c1ccef98b 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -1070,6 +1070,7 @@ static void fbcon_init(struct vc_data *vc, int init)
fvc->vc_font.data);
vc->vc_font.width = fvc->vc_font.width;
vc->vc_font.height = fvc->vc_font.height;
+ vc->vc_font.charcount = fvc->vc_font.charcount;
p->userfont = t->userfont;
if (p->userfont)
--
2.34.1
Powered by blists - more mailing lists