Skip to content

Commit 0e16fac

Browse files
mikuintgregkh
authored andcommitted
fbcon: when font is freed, clear also vc_font.data
commit e6637d5 upstream. commit ae12878 Author: Dave Airlie <airlied@redhat.com> Date: Thu Jan 24 16:12:41 2013 +1000 fbcon: don't lose the console font across generic->chip driver switch uses a pointer in vc->vc_font.data to load font into the new driver. However if the font is actually freed, we need to clear the data so that we don't reload font from dangling pointer. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=892340 Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4299d46 commit 0e16fac

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/video/console/fbcon.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,6 +1228,8 @@ static void fbcon_deinit(struct vc_data *vc)
12281228
finished:
12291229

12301230
fbcon_free_font(p, free_font);
1231+
if (free_font)
1232+
vc->vc_font.data = NULL;
12311233

12321234
if (!con_is_bound(&fb_con))
12331235
fbcon_exit();

0 commit comments

Comments
 (0)