Nam Cao 15e4c1f462 fbdev: flush deferred work in fb_deferred_io_fsync()
The driver's fsync() is supposed to flush any pending operation to
hardware. It is implemented in this driver by cancelling the queued
deferred IO first, then schedule it for "immediate execution" by calling
schedule_delayed_work() again with delay=0. However, setting delay=0
only means the work is scheduled immediately, it does not mean the work
is executed immediately. There is no guarantee that the work is finished
after schedule_delayed_work() returns. After this driver's fsync()
returns, there can still be pending work. Furthermore, if close() is
called by users immediately after fsync(), the pending work gets
cancelled and fsync() may do nothing.

To ensure that the deferred IO completes, use flush_delayed_work()
instead. Write operations to this driver either write to the device
directly, or invoke schedule_delayed_work(); so by flushing the
workqueue, it can be guaranteed that all previous writes make it to the
device.

Fixes: 5e841b88d23d ("fb: fsync() method for deferred I/O flush.")
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>
2024-01-12 12:38:37 +01:00
2024-01-10 18:18:20 -08:00
2024-01-10 17:44:36 -08:00
2024-01-10 16:43:55 -08:00
2023-12-20 19:26:31 -05:00
2024-01-10 18:00:18 -08:00
2024-01-10 18:18:20 -08:00
2024-01-10 16:43:55 -08:00
2024-01-10 16:43:55 -08:00
2023-11-04 08:07:19 -10:00
2024-01-10 11:03:52 -08:00
2024-01-10 18:13:44 -08:00
2024-01-10 16:43:55 -08:00
2024-01-09 17:16:58 -08:00
2024-01-10 17:44:36 -08:00
2023-12-20 15:02:58 -08:00
2024-01-08 10:26:08 -08:00
2024-01-09 12:57:46 -08:00
2022-09-28 09:02:20 +02:00
2022-10-10 12:00:45 -07:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
Linux kernel stable tree
Readme 6.1 GiB
Languages
C 97.5%
Assembly 1%
Shell 0.6%
Python 0.3%
Makefile 0.3%