lkml.org 
[lkml]   [2023]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/1] mm/damon/sysfs: check DAMOS regions update progress from before_terminate()
Date
Hello,

On Sat, 7 Oct 2023 20:04:32 +0000 SeongJae Park <sj@kernel.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@vger.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

[...]

\
 
 \ /
  Last update: 2023-10-07 22:11    [W:0.030 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site