summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2013-04-22 14:19:26 +0300
committerBen Hutchings <ben@decadent.org.uk>2013-05-13 15:02:24 +0100
commit3dfbb9098bb3fd1d51532dfd8cb78a041d4c76e1 (patch)
tree04e3d79219476cd4f5d8d0f30bdf478a9f92783d /drivers/video
parent48cb5f069117a32220b09f1a7897d75ea51d221c (diff)
fbcon: when font is freed, clear also vc_font.data
commit e6637d5427d2af9f3f33b95447bfc5347e5ccd85 upstream. 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> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/video')
-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 7a36dffb9573..6b4fb5cf1535 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -1229,6 +1229,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();