]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
fbcon: when font is freed, clear also vc_font.data
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Mon, 22 Apr 2013 11:19:26 +0000 (14:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2013 02:51:53 +0000 (19:51 -0700)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/video/console/fbcon.c

index 18ded2d8816b1e8f97f823c49997808e4c5e160c..a01317c9c07b152c3458d6e629d4d6e7c9daf49b 100644 (file)
@@ -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();