From: Andrew Morton <akpm@linux-foundation.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Jens Axboe <axboe@kernel.dk>, Minchan Kim <minchan@kernel.org>,
linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
Seyediman Seyedarab <imandevel@gmail.com>
Subject: Re: [PATCH] zram: protect recomp_algorithm_show() with ->init_lock
Date: Tue, 5 Aug 2025 15:03:23 -0700 [thread overview]
Message-ID: <20250805150323.0f5615ec97de2cc5d50b0b6f@linux-foundation.org> (raw)
In-Reply-To: <20250805101946.1774112-1-senozhatsky@chromium.org>
On Tue, 5 Aug 2025 19:19:29 +0900 Sergey Senozhatsky <senozhatsky@chromium.org> wrote:
> sysfs handlers should be called under ->init_lock and are not
> supposed to unlock it until return, otherwise e.g. a concurrent
> reset() can occur. There is one handler that breaks that rule:
> recomp_algorithm_show().
>
> Move ->init_lock handling outside of __comp_algorithm_show()
> (also drop it and call zcomp_available_show() directly) so that
> the entire recomp_algorithm_show() loop is protected by the
> lock, as opposed to protecting individual iterations.
As always, I'm wondering "does -stable need this". But without knowing
the runtime effects of the bug, I cannot know.
Providing this info in the changelog would answer this for everyone, please.
> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
> Reported-by: Seyediman Seyedarab <imandevel@gmail.com>
And including a Closes: for Seyediman's report (if it's publicly
linkable) would be great too, thanks.
I'm guessing that a Fixes: isn't appropriate here because the
bug has been there since day 1.
next prev parent reply other threads:[~2025-08-05 22:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-05 10:19 Sergey Senozhatsky
2025-08-05 22:03 ` Andrew Morton [this message]
2025-08-06 2:58 ` Sergey Senozhatsky
2025-08-06 23:20 ` Andrew Morton
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=20250805150323.0f5615ec97de2cc5d50b0b6f@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=imandevel@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=senozhatsky@chromium.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
all inboxes | Powered by JetHome®