[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20231007201024.3576-1-sj@kernel.org>
Date: Sat, 7 Oct 2023 20:10:24 +0000
From: SeongJae Park <sj@...nel.org>
To: SeongJae Park <sj@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>, damon@...ts.linux.dev,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH 1/1] mm/damon/sysfs: check DAMOS regions update progress from before_terminate()
Hello,
On Sat, 7 Oct 2023 20:04:32 +0000 SeongJae Park <sj@...nel.org> wrote:
> DAMON_SYSFS can receive DAMOS tried regions update request while kdamond
> is already out of the main loop and before_terminate callback
> (damon_sysfs_before_terminate() in this case) is not yet called. And
> damon_sysfs_handle_cmd() can further be finished before the callback is
> invoked. Then, damon_sysfs_before_terminate() unlocks damon_sysfs_lock,
> which is not locked by anyone. This happens because the callback
> function assumes damon_sysfs_cmd_request_callback() should be called
> before it. Check if the assumption was true before doing the unlock, to
> avoid this problem.
>
> Fixes: f1d13cacabe1 ("mm/damon/sysfs: implement DAMOS tried regions update command")
> Cc: <stable@...r.kernel.org> # 6.2.x
And this will not cleanly applied to 6.5.y, since this is based on latest
mm-unstable tree. I will send a backport once this is merged into the
mainline.
Thanks,
SJ
[...]
Powered by blists - more mailing lists