summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-01-20 13:31:10 -0800
committerJiri Slaby <jslaby@suse.cz>2014-08-26 14:12:06 +0200
commitd9be25f8975760c11671fb0d214bfeb25c9bc2b3 (patch)
treecedd923e22fe36c721759dbd0c8ec80614dcc531 /include/linux
parent0e8701c008436378d89f97e438ed8ded0debc7d4 (diff)
fbcon: Clean up fbcon data in fb_info on FB_EVENT_FB_UNBIND with 0 fbs
commit 5f4dc28bd9c8a990ed6253303b7a821a7abfe9fa upstream. 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> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions