From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Andrew Stellman <astellman@stellman-greene.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: senozhatsky@chromium.org, minchan@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] zram: reject unrecognized type= values in recompress_store()
Date: Wed, 8 Apr 2026 10:40:16 +0900 [thread overview]
Message-ID: <adWxhlxAsDNFRInc@google.com> (raw)
In-Reply-To: <20260407153027.42425-1-astellman@stellman-greene.com>
Adding Andrew on this:
Message-ID: <20260407153027.42425-1-astellman@stellman-greene.com>
On (26/04/07 11:30), Andrew Stellman wrote:
[..]
> 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.
>
> Suggested-by: Sergey Senozhatsky <senozhatsky@chromium.org>
> Signed-off-by: Andrew Stellman <astellman@stellman-greene.com>
> ---
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Thank you.
prev parent reply other threads:[~2026-04-08 1:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <MESSAGE-ID-OF-SERGEYS-REPLY>
2026-04-07 15:30 ` [PATCH v2] zram: reject unrecognized type= values in recompress_store() Andrew Stellman
2026-04-08 1:40 ` Sergey Senozhatsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=adWxhlxAsDNFRInc@google.com \
--to=senozhatsky@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=astellman@stellman-greene.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox