]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2025 10:11:00 +0000 (11:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2025 10:11:00 +0000 (11:11 +0100)
added patches:
zram-check-comp-is-non-null-before-calling-comp_destroy.patch

queue-6.1/series
queue-6.1/zram-check-comp-is-non-null-before-calling-comp_destroy.patch [new file with mode: 0644]

index e15101b4bd193e92e7763146ec9b3ed4a896a1fb..abe5c35403d0c06d4e9f2c52f6c4b314152fb4cf 100644 (file)
@@ -79,3 +79,4 @@ mm-vmscan-account-for-free-pages-to-prevent-infinite-loop-in-throttle_direct_rec
 mptcp-fix-tcp-options-overflow.patch
 mptcp-fix-recvbuffer-adjust-on-sleeping-rcvmsg.patch
 mptcp-don-t-always-assume-copied-data-in-mptcp_cleanup_rbuf.patch
+zram-check-comp-is-non-null-before-calling-comp_destroy.patch
diff --git a/queue-6.1/zram-check-comp-is-non-null-before-calling-comp_destroy.patch b/queue-6.1/zram-check-comp-is-non-null-before-calling-comp_destroy.patch
new file mode 100644 (file)
index 0000000..255983c
--- /dev/null
@@ -0,0 +1,39 @@
+From dominique.martinet@atmark-techno.com  Thu Jan  9 11:09:53 2025
+From: Dominique Martinet <dominique.martinet@atmark-techno.com>
+Date: Tue,  7 Jan 2025 16:16:04 +0900
+Subject: zram: check comp is non-NULL before calling comp_destroy
+To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: stable@vger.kernel.org, patches@lists.linux.dev, Kairui Song <kasong@tencent.com>, Desheng Wu <deshengwu@tencent.com>, Sergey Senozhatsky <senozhatsky@chromium.org>, Andrew Morton <akpm@linux-foundation.org>, Sasha Levin <sashal@kernel.org>, Dominique Martinet <dominique.martinet@atmark-techno.com>
+Message-ID: <20250107071604.190497-1-dominique.martinet@atmark-techno.com>
+
+From: Dominique Martinet <dominique.martinet@atmark-techno.com>
+
+This is a pre-requisite for the backport of commit 74363ec674cb ("zram:
+fix uninitialized ZRAM not releasing backing device"), which has been
+implemented differently in commit 7ac07a26dea7 ("zram: preparation for
+multi-zcomp support") upstream.
+
+We only need to ensure that zcomp_destroy is not called with a NULL
+comp, so add this check as the other commit cannot be backported easily.
+
+Stable-dep-of: 74363ec674cb ("zram: fix uninitialized ZRAM not releasing backing device")
+Link: https://lore.kernel.org/Z3ytcILx4S1v_ueJ@codewreck.org
+Suggested-by: Kairui Song <kasong@tencent.com>
+Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/block/zram/zram_drv.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/block/zram/zram_drv.c
++++ b/drivers/block/zram/zram_drv.c
+@@ -1733,7 +1733,8 @@ static void zram_reset_device(struct zra
+       zram_meta_free(zram, zram->disksize);
+       zram->disksize = 0;
+       memset(&zram->stats, 0, sizeof(zram->stats));
+-      zcomp_destroy(zram->comp);
++      if (zram->comp)
++              zcomp_destroy(zram->comp);
+       zram->comp = NULL;
+       reset_bdev(zram);