From: Greg Kroah-Hartman Date: Thu, 9 Jan 2025 10:13:56 +0000 (+0100) Subject: drop queue-5.15/drivers-block-zram-zram_drv.c-do-not-keep-dangling-z.patch X-Git-Tag: v5.4.289~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1651b5cee60475f0299693af18ec8e88e5ce8926;p=thirdparty%2Fkernel%2Fstable-queue.git drop queue-5.15/drivers-block-zram-zram_drv.c-do-not-keep-dangling-z.patch not needed anymore --- diff --git a/queue-5.15/drivers-block-zram-zram_drv.c-do-not-keep-dangling-z.patch b/queue-5.15/drivers-block-zram-zram_drv.c-do-not-keep-dangling-z.patch deleted file mode 100644 index a42aa9c4666..00000000000 --- a/queue-5.15/drivers-block-zram-zram_drv.c-do-not-keep-dangling-z.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 0ebd54b4dc2bdc5fd7792a005abdbf664bb6d805 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 24 Aug 2022 12:51:00 +0900 -Subject: drivers/block/zram/zram_drv.c: do not keep dangling zcomp pointer - after zram reset - -From: Sergey Senozhatsky - -[ Upstream commit 6d2453c3dbc5f70eafc1c866289a90a1fc57ce18 ] - -We do all reset operations under write lock, so we don't need to save -->disksize and ->comp to stack variables. Another thing is that ->comp is -freed during zram reset, but comp pointer is not NULL-ed, so zram keeps -the freed pointer value. - -Link: https://lkml.kernel.org/r/20220824035100.971816-1-senozhatsky@chromium.org -Signed-off-by: Sergey Senozhatsky -Cc: Minchan Kim -Cc: Nitin Gupta -Signed-off-by: Andrew Morton -Stable-dep-of: 74363ec674cb ("zram: fix uninitialized ZRAM not releasing backing device") -Signed-off-by: Sasha Levin ---- - drivers/block/zram/zram_drv.c | 13 ++++--------- - 1 file changed, 4 insertions(+), 9 deletions(-) - -diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c -index a9f71b27d235..9eed579d02f0 100644 ---- a/drivers/block/zram/zram_drv.c -+++ b/drivers/block/zram/zram_drv.c -@@ -1695,9 +1695,6 @@ static int zram_rw_page(struct block_device *bdev, sector_t sector, - - static void zram_reset_device(struct zram *zram) - { -- struct zcomp *comp; -- u64 disksize; -- - down_write(&zram->init_lock); - - zram->limit_pages = 0; -@@ -1707,18 +1704,16 @@ static void zram_reset_device(struct zram *zram) - return; - } - -- comp = zram->comp; -- disksize = zram->disksize; -- zram->disksize = 0; -- - set_capacity_and_notify(zram->disk, 0); - part_stat_set_all(zram->disk->part0, 0); - - up_write(&zram->init_lock); - /* I/O operation under all of CPU are done so let's free */ -- zram_meta_free(zram, disksize); -+ zram_meta_free(zram, zram->disksize); -+ zram->disksize = 0; - memset(&zram->stats, 0, sizeof(zram->stats)); -- zcomp_destroy(comp); -+ zcomp_destroy(zram->comp); -+ zram->comp = NULL; - reset_bdev(zram); - } - --- -2.39.5 - diff --git a/queue-5.15/series b/queue-5.15/series index e0b74230907..c6398b9157e 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -112,7 +112,6 @@ thunderbolt-add-support-for-intel-panther-lake-m-p.patch xhci-retry-stop-endpoint-on-buggy-nec-controllers.patch usb-xhci-limit-stop-endpoint-retries.patch xhci-turn-nec-specific-quirk-for-handling-stop-endpo.patch -drivers-block-zram-zram_drv.c-do-not-keep-dangling-z.patch rdma-mlx5-enforce-same-type-port-association-for-mul.patch rdma-bnxt_re-add-check-for-path-mtu-in-modify_qp.patch rdma-bnxt_re-fix-reporting-hw_ver-in-query_device.patch