All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] zram-reject-unrecognized-type=-values-in-recompress_store.patch removed from -mm tree
@ 2026-04-18  7:58 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-04-18  7:58 UTC (permalink / raw)
  To: mm-commits, senozhatsky, minchan, axboe, astellman, akpm

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1936 bytes --]


The quilt patch titled
     Subject: zram: reject unrecognized type= values in recompress_store()
has been removed from the -mm tree.  Its filename was
     zram-reject-unrecognized-type=-values-in-recompress_store.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Andrew Stellman <astellman@stellman-greene.com>
Subject: zram: reject unrecognized type= values in recompress_store()
Date: Tue, 7 Apr 2026 11:30:27 -0400

recompress_store() parses the type= parameter with three if statements
checking for "idle", "huge", and "huge_idle".  An unrecognized value
silently falls through with mode left at 0, causing the recompression pass
to run with no slot filter — processing all slots instead of the
intended subset.

Add a !mode check after the type parsing block to return -EINVAL for
unrecognized values, consistent with the function's other parameter
validation.

Link: https://lore.kernel.org/20260407153027.42425-1-astellman@stellman-greene.com
Signed-off-by: Andrew Stellman <astellman@stellman-greene.com>
Suggested-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/block/zram/zram_drv.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/block/zram/zram_drv.c~zram-reject-unrecognized-type=-values-in-recompress_store
+++ a/drivers/block/zram/zram_drv.c
@@ -2546,6 +2546,8 @@ static ssize_t recompress_store(struct d
 				mode = RECOMPRESS_HUGE;
 			if (!strcmp(val, "huge_idle"))
 				mode = RECOMPRESS_IDLE | RECOMPRESS_HUGE;
+			if (!mode)
+				return -EINVAL;
 			continue;
 		}
 
_

Patches currently in -mm which might be from astellman@stellman-greene.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-18  7:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-18  7:58 [merged mm-stable] zram-reject-unrecognized-type=-values-in-recompress_store.patch removed from -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.