mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 07:22:33 +00:00
2c363a070e
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.75 Removed upstreamed: generic/hack-6.1/321-powerpc_crtsavres_prereq.patch[1] generic/pending-6.1/540-ksmbd-only-v2-leases-handle-the-directory.patch[2] Rebased: bcm27xx/patches-6.1/950-0670-fbdev-Don-t-cancel-deferred-work-if-pagelist-empty.patch[3] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.75&id=16b88e68b85d5520c28498bb847358ff6300cb90 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/fs/smb?h=v6.1.75&id=c866866c795296d3637ab0d48a3d8a3ef5d6f4a3 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.75&id=81f444f22816a82ada2cc787a2845cffc8c584a6 Build system: x86/64 Build-tested: x86/64/AMD Cezanne Run-tested: x86/64/AMD Cezanne Signed-off-by: John Audia <therealgraysky@proton.me>
37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
From cf40d2d8c44a659d09d5c20189aab02f20263e81 Mon Sep 17 00:00:00 2001
|
|
From: Phil Elwell <phil@raspberrypi.com>
|
|
Date: Wed, 29 Mar 2023 09:49:36 +0100
|
|
Subject: [PATCH] fbdev: Don't cancel deferred work if pagelist empty
|
|
|
|
Since [1], the fbdev deferred IO framework is careful to cancel
|
|
pending updates on close to prevent dirty pages being accessed after
|
|
they may have been reused. However, this is not necessary in the case
|
|
that the pagelist is empty, and drivers that don't make use of the
|
|
pagelist may have wanted updates cancelled for no good reason.
|
|
|
|
Avoid penalising fbdev drivers that don't make use of the pagelist by
|
|
making the cancelling of deferred IO on close conditional on there
|
|
being a non-empty pagelist.
|
|
|
|
See: https://github.com/raspberrypi/linux/issues/5398
|
|
|
|
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|
|
|
[1] 3efc61d95259 ("fbdev: Fix invalid page access after closing deferred I/O devices")
|
|
---
|
|
drivers/video/fbdev/core/fb_defio.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/video/fbdev/core/fb_defio.c
|
|
+++ b/drivers/video/fbdev/core/fb_defio.c
|
|
@@ -317,7 +317,8 @@ static void fb_deferred_io_lastclose(str
|
|
struct page *page;
|
|
int i;
|
|
|
|
- flush_delayed_work(&info->deferred_work);
|
|
+ if (!list_empty(&info->fbdefio->pagereflist))
|
|
+ flush_delayed_work(&info->deferred_work);
|
|
|
|
/* clear out the mapping that we setup */
|
|
for (i = 0 ; i < info->fix.smem_len; i += PAGE_SIZE) {
|