Skip to content

Commit

Permalink
fbcon: when font is freed, clear also vc_font.data
Browse files Browse the repository at this point in the history
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>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Mika Kuoppala authored and Dave Airlie committed Apr 24, 2013
1 parent 0a39715 commit e6637d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/video/console/fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,8 @@ static void fbcon_deinit(struct vc_data *vc)
finished:

fbcon_free_font(p, free_font);
if (free_font)
vc->vc_font.data = NULL;

if (!con_is_bound(&fb_con))
fbcon_exit();
Expand Down

0 comments on commit e6637d5

Please sign in to comment.