Re: [PATCH 1/1] mm/damon/sysfs: check DAMOS regions update progress from before_terminate()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Sat, 7 Oct 2023 20:04:32 +0000 SeongJae Park <sj@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx> # 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

[...]




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux