aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2013-04-22 07:19:26 -0400
committerDave Airlie <airlied@redhat.com>2013-04-23 20:43:11 -0400
commite6637d5427d2af9f3f33b95447bfc5347e5ccd85 (patch)
tree1864961c00e7eb248316656d9e74cd4a7a44927c
parent0a397154e2240c928ebc2167d18c0b8ab7a7ac56 (diff)
fbcon: when font is freed, clear also vc_font.data
commit ae1287865f5361fa138d4d3b1b6277908b54eac9 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>
-rw-r--r--drivers/video/console/fbcon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 3cd675927826..a92783e480e6 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -1228,6 +1228,8 @@ static void fbcon_deinit(struct vc_data *vc)
1228finished: 1228finished:
1229 1229
1230 fbcon_free_font(p, free_font); 1230 fbcon_free_font(p, free_font);
1231 if (free_font)
1232 vc->vc_font.data = NULL;
1231 1233
1232 if (!con_is_bound(&fb_con)) 1234 if (!con_is_bound(&fb_con))
1233 fbcon_exit(); 1235 fbcon_exit();