linux/drivers/video/console
Keith Packard 5f4dc28bd9 fbcon: Clean up fbcon data in fb_info on FB_EVENT_FB_UNBIND with 0 fbs
When FB_EVENT_FB_UNBIND is sent, fbcon has two paths, one path taken
when there is another frame buffer to switch any affected vcs to and
another path when there isn't.

In the case where there is another frame buffer to use,
fbcon_fb_unbind calls set_con2fb_map to remap all of the affected vcs
to the replacement frame buffer. set_con2fb_map will eventually call
con2fb_release_oldinfo when the last vcs gets unmapped from the old
frame buffer.

con2fb_release_oldinfo frees the fbcon data that is hooked off of the
fb_info structure, including the cursor timer.

In the case where there isn't another frame buffer to use,
fbcon_fb_unbind simply calls fbcon_unbind, which doesn't clear the
con2fb_map or free the fbcon data hooked from the fb_info
structure. In particular, it doesn't stop the cursor blink timer. When
the fb_info structure is then freed, we end up with a timer queue
pointing into freed memory and "bad things" start happening.

This patch first changes con2fb_release_oldinfo so that it can take a
NULL pointer for the new frame buffer, but still does all of the
deallocation and cursor timer cleanup.

Finally, the patch tries to replicate some of what set_con2fb_map does
by clearing the con2fb_map for the affected vcs and calling the
modified con2fb_release_info function to clean up the fb_info structure.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-02-11 14:16:22 +02:00
..
Kconfig video: vgacon: Don't build on arm64 2014-01-17 10:57:45 +02:00
Makefile lib: Move fonts from drivers/video/console/ to lib/fonts/ 2013-06-28 10:28:22 +02:00
bitblit.c fbcon: Fix bit_putcs() call to kmalloc(s, GFP_KERNEL) 2012-08-23 12:29:32 +00:00
dummycon.c
fbcon.c fbcon: Clean up fbcon data in fb_info on FB_EVENT_FB_UNBIND with 0 fbs 2014-02-11 14:16:22 +02:00
fbcon.h fb: add hooks to handle KDB enter/exit 2010-08-05 09:22:31 -05:00
fbcon_ccw.c fbcon: uninline four foo_update_attr() functions 2010-08-11 08:59:09 -07:00
fbcon_cw.c drivers/video/console/fbcon_cw.c: fix compiler warning in cw_update_attr 2013-04-29 15:54:26 -07:00
fbcon_rotate.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
fbcon_rotate.h fbcon: fix rotate upside down crash 2009-08-07 10:39:55 -07:00
fbcon_ud.c fbcon: uninline four foo_update_attr() functions 2010-08-11 08:59:09 -07:00
mdacon.c TTY:vt: convert remain take_over_console's users to do_take_over_console 2013-05-20 22:29:27 -07:00
newport_con.c TTY:vt: convert remain take_over_console's users to do_take_over_console 2013-05-20 22:29:27 -07:00
softcursor.c drivers/video/console/softcursor.c: remove redundant NULL check before kfree() 2012-12-10 11:33:53 +02:00
sticon.c TTY:vt: convert remain take_over_console's users to do_take_over_console 2013-05-20 22:29:27 -07:00
sticore.c parisc/sti_console: prefer Linux fonts over built-in ROM fonts 2014-02-02 20:56:47 +01:00
tileblit.c fbcon: Bugfix soft cursor detection in Tile Blitting 2011-03-22 16:41:08 +09:00
vgacon.c vgacon: fix missing include. 2013-06-27 10:08:04 +10:00