linux/drivers/video/fbdev/core
Takashi Iwai f1d91f0e9d fbdev: Fix invalid page access after closing deferred I/O devices
commit 3efc61d952 upstream.

When a fbdev with deferred I/O is once opened and closed, the dirty
pages still remain queued in the pageref list, and eventually later
those may be processed in the delayed work.  This may lead to a
corruption of pages, hitting an Oops.

This patch makes sure to cancel the delayed work and clean up the
pageref list at closing the device for addressing the bug.  A part of
the cleanup code is factored out as a new helper function that is
called from the common fb_release().

Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Miko Larsson <mikoxyzzz@gmail.com>
Fixes: 56c134f7f1 ("fbdev: Track deferred-I/O pages in pageref struct")
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230129082856.22113-1-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:59:46 +01:00
..
bitblit.c
cfbcopyarea.c
cfbfillrect.c
cfbimgblt.c
fb_cmdline.c
fb_ddc.c
fb_defio.c fbdev: Fix invalid page access after closing deferred I/O devices 2023-02-22 12:59:46 +01:00
fb_draw.h
fb_notify.c
fb_sys_fops.c
fbcmap.c
fbcon_ccw.c
fbcon_cw.c
fbcon_rotate.c
fbcon_rotate.h
fbcon_ud.c
fbcon.c fbcon: Check font dimension limits 2023-02-09 11:28:15 +01:00
fbcon.h
fbcvt.c
fbmem.c fbdev: Fix invalid page access after closing deferred I/O devices 2023-02-22 12:59:46 +01:00
fbmon.c
fbsysfs.c fbdev: fbcon: Destroy mutex on freeing struct fb_info 2022-08-24 21:47:08 +02:00
Makefile
modedb.c
softcursor.c
svgalib.c
syscopyarea.c
sysfillrect.c
sysimgblt.c
tileblit.c