linux/drivers/video/fbdev/core
Nam Cao 21ba4f2543 fbdev: flush deferred IO before closing
commit 33cd6ea9c0 upstream.

When framebuffer gets closed, the queued deferred IO gets cancelled. This
can cause some last display data to vanish. This is problematic for users
who send a still image to the framebuffer, then close the file: the image
may never appear.

To ensure none of display data get lost, flush the queued deferred IO
first before closing.

Another possible solution is to delete the cancel_delayed_work_sync()
instead. The difference is that the display may appear some time after
closing. However, the clearing of page mapping after this needs to be
removed too, because the page mapping is used by the deferred work. It is
not completely obvious whether it is okay to not clear the page mapping.
For a patch intended for stable trees, go with the simple and obvious
solution.

Fixes: 60b59beafb ("fbdev: mm: Deferred IO support")
Cc: stable@vger.kernel.org
Signed-off-by: Nam Cao <namcao@linutronix.de>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-01-25 15:45:13 -08:00
..
bitblit.c fbcon: Fix null-ptr-deref in soft_cursor 2023-05-27 19:18:59 +02:00
cfbcopyarea.c fbdev: core: cfbcopyarea: fix sloppy typing 2023-10-16 23:22:53 +02:00
cfbfillrect.c fbdev: move fbdev core files to separate directory 2014-04-17 08:10:19 +03:00
cfbimgblt.c fbdev: Fix cfb_imageblit() for arbitrary image widths 2022-03-25 09:55:54 +10:00
fb_backlight.c fbdev/core: Move framebuffer and backlight helpers into separate files 2023-06-27 09:58:51 +02:00
fb_chrdev.c fbdev: Replace fb_pgprotect() with pgprot_framebuffer() 2023-10-12 09:20:46 +02:00
fb_cmdline.c fbdev: Handle video= parameter in video/cmdline.c 2023-02-20 14:56:48 +01:00
fb_ddc.c fb_ddc: Allow I2C adapters without SCL read capability 2015-09-30 10:46:55 +03:00
fb_defio.c fbdev: flush deferred IO before closing 2024-01-25 15:45:13 -08:00
fb_draw.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fb_info.c fbdev: Document that framebuffer_alloc() returns zero'ed data 2023-07-24 16:50:39 +02:00
fb_internal.h fbdev/core: Move logo functions into separate source file 2023-09-11 15:12:35 +02:00
fb_io_fops.c fbdev: Provide I/O-memory helpers as module 2023-10-19 09:47:54 +02:00
fb_logo.c fbdev/core: Remove empty internal helpers from fb_logo.c 2023-09-11 15:12:37 +02:00
fb_notify.c video: fbdev: core: Fix kernel-doc warnings in fbmon + fb_notify 2020-12-08 18:31:56 +01:00
fb_procfs.c fbdev/core: Move procfs code to separate file 2023-06-27 09:58:51 +02:00
fb_sys_fops.c fbdev: Validate info->screen_{base, buffer} in fb_ops implementations 2023-05-08 15:28:34 +02:00
fbcmap.c fbdev: zero-fill colormap in fbcmap.c 2021-04-10 11:12:08 +02:00
fbcon.c Merge tag 'drm-misc-next-2023-09-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-09-29 08:27:15 +10:00
fbcon.h fbcon: Replace FBCON_FLAGS_INIT with a boolean 2022-04-07 16:52:13 +02:00
fbcon_ccw.c fbcon: Add option to enable legacy hardware acceleration 2022-02-02 15:16:26 +01:00
fbcon_cw.c fbcon: Add option to enable legacy hardware acceleration 2022-02-02 15:16:26 +01:00
fbcon_rotate.c fbcon: Drop EXPORT_SYMBOL 2020-11-17 11:00:43 +01:00
fbcon_rotate.h fbcon: Add option to enable legacy hardware acceleration 2022-02-02 15:16:26 +01:00
fbcon_ud.c fbcon: Add option to enable legacy hardware acceleration 2022-02-02 15:16:26 +01:00
fbcvt.c video: fbdev: fbcvt.c: fix printing in fb_cvt_print_name() 2022-01-30 21:19:22 +01:00
fbmem.c fbdev/core: Clean up include statements in fbmem.c 2023-09-11 15:12:38 +02:00
fbmon.c fbdev: fbmon: fix function name in kernel-doc 2023-01-16 09:37:31 +01:00
fbsysfs.c fbdev/core: Use list_for_each_entry() helper 2023-08-31 22:54:34 +02:00
Kconfig Merge tag 'drm-misc-next-2023-10-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-10-31 10:47:50 +10:00
Makefile fbdev: Provide I/O-memory helpers as module 2023-10-19 09:47:54 +02:00
modedb.c fbdev/core: Use list_for_each_entry() helper 2023-08-31 22:54:34 +02:00
softcursor.c fbcon: Drop EXPORT_SYMBOL 2020-11-17 11:00:43 +01:00
svgalib.c drm/i915: Move abs_diff() to math.h 2023-08-18 10:18:59 -07:00
syscopyarea.c fbdev: core: syscopyarea: fix sloppy typing 2023-10-16 23:22:53 +02:00
sysfillrect.c fbdev: Improve performance of sys_fillrect() 2022-03-02 20:20:34 +01:00
sysimgblt.c fbdev: fix potential OOB read in fast_imageblit() 2023-06-24 21:55:11 +02:00
tileblit.c Revert "fbdev: Garbage collect fbdev scrolling acceleration, part 1 (from TODO list)" 2022-02-02 15:14:56 +01:00