From: Tejun Heo <tj@kernel.org>
To: Chen Ridong <chenridong@huaweicloud.com>
Cc: hannes@cmpxchg.org, mkoutny@suse.com, rafael.j.wysocki@intel.com,
mingo@kernel.org, peterz@infradead.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, lujialin4@huawei.com,
chenridong@huawei.com
Subject: Re: [next] cgroup,freezer: fix incomplete freezing when attaching tasks
Date: Wed, 18 Jun 2025 09:45:26 -1000 [thread overview]
Message-ID: <aFMXVsVKX8RAIYdD@slm.duckdns.org> (raw)
In-Reply-To: <20250618073217.2983275-1-chenridong@huaweicloud.com>
On Wed, Jun 18, 2025 at 07:32:17AM +0000, Chen Ridong wrote:
> From: Chen Ridong <chenridong@huawei.com>
>
> An issue was found:
>
> # cd /sys/fs/cgroup/freezer/
> # mkdir test
> # echo FROZEN > test/freezer.state
> # cat test/freezer.state
> FROZEN
> # sleep 1000 &
> [1] 863
> # echo 863 > test/cgroup.procs
> # cat test/freezer.state
> FREEZING
>
> When tasks are migrated to a frozen cgroup, the freezer fails to
> immediately freeze the tasks, causing the cgroup to remain in the
> "FREEZING".
>
> The freeze_task() function is called before clearing the CGROUP_FROZEN
> flag. This causes the freezing() check to incorrectly return false,
> preventing __freeze_task() from being invoked for the migrated task.
>
> To fix this issue, clear the CGROUP_FROZEN state before calling
> freeze_task().
>
> Fixes: f5d39b020809 ("freezer,sched: Rewrite core freezer logic")
> Reported-by: Zhong Jiawei <zhongjiawei1@huawei.com>
> Signed-off-by: Chen Ridong <chenridong@huawei.com>
Applied to cgroup/for-6.16-fixes w/ stable cc'd.
Thanks.
--
tejun
prev parent reply other threads:[~2025-06-18 19:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 7:32 [next] cgroup,freezer: fix incomplete freezing when attaching tasks Chen Ridong
2025-06-18 8:42 ` Michal Koutný
2025-06-18 9:03 ` Chen Ridong
2025-06-18 19:45 ` Tejun Heo [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=aFMXVsVKX8RAIYdD@slm.duckdns.org \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=chenridong@huawei.com \
--cc=chenridong@huaweicloud.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lujialin4@huawei.com \
--cc=mingo@kernel.org \
--cc=mkoutny@suse.com \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).