[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250805150323.0f5615ec97de2cc5d50b0b6f@linux-foundation.org>
Date: Tue, 5 Aug 2025 15:03:23 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Sergey Senozhatsky <senozhatsky@...omium.org>
Cc: Jens Axboe <axboe@...nel.dk>, Minchan Kim <minchan@...nel.org>,
linux-kernel@...r.kernel.org, linux-block@...r.kernel.org, Seyediman
Seyedarab <imandevel@...il.com>
Subject: Re: [PATCH] zram: protect recomp_algorithm_show() with ->init_lock
On Tue, 5 Aug 2025 19:19:29 +0900 Sergey Senozhatsky <senozhatsky@...omium.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@...omium.org>
> Reported-by: Seyediman Seyedarab <imandevel@...il.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.
Powered by blists - more mailing lists