From: Sasha Levin Date: Mon, 30 Oct 2023 21:13:05 +0000 (-0400) Subject: Fixes for 4.19 X-Git-Tag: v6.1.61~41 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=650dbd894709a81205b8f18bfe340ae7211ad81d;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.19 Signed-off-by: Sasha Levin --- diff --git a/queue-4.19/nfs-don-t-call-generic_error_remove_page-while-holdi.patch b/queue-4.19/nfs-don-t-call-generic_error_remove_page-while-holdi.patch new file mode 100644 index 00000000000..2779be7d8c0 --- /dev/null +++ b/queue-4.19/nfs-don-t-call-generic_error_remove_page-while-holdi.patch @@ -0,0 +1,38 @@ +From 21ea79c63b30a70b86f37f44c38d17fcf62dbc69 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 7 Apr 2019 13:59:03 -0400 +Subject: NFS: Don't call generic_error_remove_page() while holding locks + +From: Trond Myklebust + +[ Upstream commit 22876f540bdf19af9e4fca893ce02ba7ee65ebcc ] + +The NFS read code can trigger writeback while holding the page lock. +If an error then triggers a call to nfs_write_error_remove_page(), +we can deadlock. + +Signed-off-by: Trond Myklebust +Signed-off-by: Anna Schumaker +Signed-off-by: Sasha Levin +--- + fs/nfs/write.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/fs/nfs/write.c b/fs/nfs/write.c +index ec0fd6b3d185a..65aaa6eaad2c1 100644 +--- a/fs/nfs/write.c ++++ b/fs/nfs/write.c +@@ -598,9 +598,8 @@ nfs_lock_and_join_requests(struct page *page) + + static void nfs_write_error_remove_page(struct nfs_page *req) + { ++ SetPageError(req->wb_page); + nfs_end_page_writeback(req); +- generic_error_remove_page(page_file_mapping(req->wb_page), +- req->wb_page); + nfs_release_request(req); + } + +-- +2.42.0 + diff --git a/queue-4.19/series b/queue-4.19/series index c4bb7849f44..63ecdd921a7 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -24,3 +24,4 @@ acpica-add-support-for-madt-online-enabled-bit.patch x86-acpi-don-t-add-cpus-that-are-not-online-capable.patch x86-acpi-boot-use-fadt-version-to-check-support-for-.patch x86-i8259-skip-probing-when-acpi-madt-advertises-pca.patch +nfs-don-t-call-generic_error_remove_page-while-holdi.patch