From: SeongJae Park <sj@kernel.org>
To: SeongJae Park <sj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
damon@lists.linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 1/1] mm/damon/sysfs: check DAMOS regions update progress from before_terminate()
Date: Sat, 7 Oct 2023 20:10:24 +0000 [thread overview]
Message-ID: <20231007201024.3576-1-sj@kernel.org> (raw)
In-Reply-To: <20231007200432.3110-1-sj@kernel.org>
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
[...]
prev parent reply other threads:[~2023-10-07 20:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-07 20:04 [PATCH 1/1] mm/damon/sysfs: check DAMOS regions update progress from before_terminate() SeongJae Park
2023-10-07 20:10 ` SeongJae Park [this message]
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=20231007201024.3576-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=stable@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.