linux/drivers/video/fbdev
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
..
aty drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
core fbdev: Fix invalid page access after closing deferred I/O devices 2023-02-22 12:59:46 +01:00
geode fbdev: geode: don't build on UML 2022-12-31 13:32:43 +01:00
i810 fbdev: Remove conflicting devices on PCI bus 2022-07-19 13:19:11 +02:00
intelfb fbdev: Remove conflicting devices on PCI bus 2022-07-19 13:19:11 +02:00
kyro fbdev: Remove conflicting devices on PCI bus 2022-07-19 13:19:11 +02:00
matrox fbdev: matroxfb: G200eW: Increase max memory from 1 MB to 16 MB 2023-01-12 12:02:44 +01:00
mb862xx fbdev: mb862xx: Fix check of return value from irq_of_parse_and_map() 2022-10-08 15:20:09 +02:00
mmp
nvidia nvidiafb: detect the hardware support before removing console. 2023-02-14 19:11:45 +01:00
omap fbdev: omap: Remove unnecessary print function dev_err() 2022-08-24 21:53:41 +02:00
omap2 fbdev: omapfb: avoid stack overflow warning 2023-01-24 07:24:32 +01:00
riva fbdev: Remove conflicting devices on PCI bus 2022-07-19 13:19:11 +02:00
savage fbdev: Remove conflicting devices on PCI bus 2022-07-19 13:19:11 +02:00
sis fbdev: sisfb: use explicitly signed char 2022-10-24 20:28:41 +02:00
vermilion fbdev: vermilion: decrease reference count in error path 2022-12-31 13:32:43 +01:00
via fbdev: via: Fix error in via_core_init() 2022-12-31 13:32:43 +01:00
68328fb.c video: fbdev: Make *fb_setup() and *fb_init() static 2022-07-18 07:54:20 +02:00
acornfb.c
acornfb.h
amba-clcd.c video: fbdev: amba-clcd: Fix refcount leak bugs 2022-07-26 08:56:22 +02:00
amifb.c video: fbdev: amiga: Simplify amifb_pan_display() 2022-07-18 07:54:17 +02:00
arcfb.c
arkfb.c fbdev: arkfb: Remove the unused function dac_read_reg() 2022-10-08 15:20:08 +02:00
asiliantfb.c fbdev: Remove conflicting devices on PCI bus 2022-07-19 13:19:11 +02:00
atafb_iplan2p2.c
atafb_iplan2p4.c
atafb_iplan2p8.c
atafb_mfb.c
atafb_utils.h
atafb.c video: fbdev: atari: Remove backward bug-compatibility 2022-07-18 07:56:18 +02:00
atafb.h
atmel_lcdfb.c
au1100fb.c video: fbdev: au1100fb: Drop unnecessary NULL ptr check 2022-06-20 20:19:50 +02:00
au1100fb.h
au1200fb.c
au1200fb.h
broadsheetfb.c
bt431.h
bt455.h
bw2.c fbdev: Move fbdev drivers from strlcpy to strscpy 2022-08-24 22:06:15 +02:00
c2p_core.h
c2p_iplan2.c
c2p_planar.c
c2p.h
carminefb_regs.h
carminefb.c fbdev: Remove conflicting devices on PCI bus 2022-07-19 13:19:11 +02:00
carminefb.h
cg3.c
cg6.c
cg14.c
chipsfb.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
cirrusfb.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
clps711x-fb.c fbdev: Move fbdev drivers from strlcpy to strscpy 2022-08-24 22:06:15 +02:00
cobalt_lcdfb.c
controlfb.c fbdev: controlfb: Remove the unused function VAR_MATCH() 2022-10-08 15:20:08 +02:00
controlfb.h
cyber2000fb.c fbdev: cyber2000fb: fix missing pci_disable_device() 2022-10-27 20:29:59 +02:00
cyber2000fb.h
da8xx-fb.c fbdev: da8xx-fb: Fix error handling in .remove() 2022-10-18 10:22:28 +02:00
dnfb.c video: fbdev: Make *fb_setup() and *fb_init() static 2022-07-18 07:54:20 +02:00
edid.h
efifb.c Merge drm/drm-next into drm-misc-next 2022-06-20 18:21:25 +02:00
ep93xx-fb.c fbdev: ep93xx-fb: Add missing clk_disable_unprepare in ep93xxfb_probe() 2022-12-31 13:32:43 +01:00
ffb.c fbdev: Move fbdev drivers from strlcpy to strscpy 2022-08-24 22:06:15 +02:00
fm2fb.c video: fbdev: Make *fb_setup() and *fb_init() static 2022-07-18 07:54:20 +02:00
fsl-diu-fb.c
g364fb.c
gbefb.c fbdev: gbefb: Convert sysfs snprintf to sysfs_emit 2022-10-18 10:28:41 +02:00
goldfishfb.c
grvga.c
gxt4500.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
hecubafb.c
hgafb.c
hitfb.c
hpfb.c video: fbdev: Make *fb_setup() and *fb_init() static 2022-07-18 07:54:20 +02:00
hyperv_fb.c video: hyperv_fb: Avoid taking busy spinlock on panic path 2022-12-31 13:32:56 +01:00
i740_reg.h
i740fb.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
imsttfb.c fbdev: Remove conflicting devices on PCI bus 2022-07-19 13:19:11 +02:00
imxfb.c fbdev: imxfb: Remove redundant dev_err() call 2022-10-08 15:20:08 +02:00
Kconfig fbdev: uvesafb: don't build on UML 2022-12-31 13:32:43 +01:00
leo.c
macfb.c
macmodes.c
macmodes.h
Makefile
maxinefb.c
metronomefb.c
mx3fb.c
n411.c
neofb.c fbdev: Remove conflicting devices on PCI bus 2022-07-19 13:19:11 +02:00
ocfb.c
offb.c video: fbdev: offb: Include missing linux/platform_device.h 2022-07-28 16:22:12 +10:00
p9100.c
platinumfb.c
platinumfb.h
pm2fb.c fbdev: pm2fb: fix missing pci_disable_device() 2022-12-31 13:32:43 +01:00
pm3fb.c fbdev: Remove conflicting devices on PCI bus 2022-07-19 13:19:11 +02:00
pmag-aa-fb.c
pmag-ba-fb.c
pmagb-b-fb.c
ps3fb.c
pvr2fb.c fbdev: Remove conflicting devices on PCI bus 2022-07-19 13:19:11 +02:00
pxa3xx-gcu.c video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write 2022-06-20 20:12:17 +02:00
pxa3xx-gcu.h
pxa3xx-regs.h
pxa168fb.c fbdev: Move fbdev drivers from strlcpy to strscpy 2022-08-24 22:06:15 +02:00
pxa168fb.h
pxafb.c fbdev: Move fbdev drivers from strlcpy to strscpy 2022-08-24 22:06:15 +02:00
pxafb.h
q40fb.c video: fbdev: Make *fb_setup() and *fb_init() static 2022-07-18 07:54:20 +02:00
s1d13xxxfb.c
s3c-fb.c
s3c2410fb-regs-lcd.h
s3c2410fb.c
s3c2410fb.h
s3fb.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
sa1100fb.c video: fbdev: sa1100fb: Remove unused sa1100fb_setup() 2022-07-18 07:54:18 +02:00
sa1100fb.h
sbuslib.c
sbuslib.h
sh_mobile_lcdcfb.c
sh_mobile_lcdcfb.h
sh7760fb.c
simplefb.c fbdev: Move fbdev drivers from strlcpy to strscpy 2022-08-24 22:06:15 +02:00
skeletonfb.c drm-misc-next for v6.1: 2022-09-06 10:56:04 +02:00
sm501fb.c fbdev: sm501fb: Convert sysfs snprintf to sysfs_emit 2022-10-18 10:22:28 +02:00
sm712.h
sm712fb.c fbdev: Remove conflicting devices on PCI bus 2022-07-19 13:19:11 +02:00
smscufx.c fbdev: smscufx: fix error handling code in ufx_usb_probe 2023-02-09 11:28:27 +01:00
ssd1307fb.c Merge tag 'v6.0-rc5' into i2c/for-mergewindow 2022-09-16 20:42:18 +01:00
sstfb.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
sticore.h parisc/stifb: Keep track of hardware path of graphics card 2022-06-04 15:47:03 +02:00
stifb.c fbdev: stifb: Fall back to cfb_fillrect() on 32-bit HCRX cards 2022-10-18 10:22:28 +02:00
sunxvr500.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
sunxvr1000.c fbdev: Move fbdev drivers from strlcpy to strscpy 2022-08-24 22:06:15 +02:00
sunxvr2500.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
tcx.c fbdev: Move fbdev drivers from strlcpy to strscpy 2022-08-24 22:06:15 +02:00
tdfxfb.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
tgafb.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
tmiofb.c
tridentfb.c fbdev: tridentfb: Fix missing pci_disable_device() in probe and remove 2022-10-08 15:20:09 +02:00
udlfb.c fbdev: udlfb: Remove redundant initialization to variable identical 2022-10-08 15:20:08 +02:00
uvesafb.c fbdev: uvesafb: Fixes an error handling path in uvesafb_probe() 2022-12-31 13:32:43 +01:00
valkyriefb.c video: fbdev: Make *fb_setup() and *fb_init() static 2022-07-18 07:54:20 +02:00
valkyriefb.h
vesafb.c
vfb.c
vga16fb.c fbdev: vga16fb: Add missing MODULE_DEVICE_TABLE() entry 2022-10-08 15:20:09 +02:00
vt8500lcdfb.c
vt8500lcdfb.h
vt8623fb.c drm-misc-next for v6.1: 2022-09-06 10:56:04 +02:00
w100fb.c
w100fb.h
wm8505fb_regs.h
wm8505fb.c
wmt_ge_rops.c
wmt_ge_rops.h
xen-fbfront.c
xilinxfb.c fbdev: xilinxfb: Make xilinxfb_release() return void 2022-10-20 08:36:41 +02:00