[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aFMXVsVKX8RAIYdD@slm.duckdns.org>
Date: Wed, 18 Jun 2025 09:45:26 -1000
From: Tejun Heo <tj@...nel.org>
To: Chen Ridong <chenridong@...weicloud.com>
Cc: hannes@...xchg.org, mkoutny@...e.com, rafael.j.wysocki@...el.com,
mingo@...nel.org, peterz@...radead.org, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org, lujialin4@...wei.com,
chenridong@...wei.com
Subject: Re: [next] cgroup,freezer: fix incomplete freezing when attaching
tasks
On Wed, Jun 18, 2025 at 07:32:17AM +0000, Chen Ridong wrote:
> From: Chen Ridong <chenridong@...wei.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@...wei.com>
> Signed-off-by: Chen Ridong <chenridong@...wei.com>
Applied to cgroup/for-6.16-fixes w/ stable cc'd.
Thanks.
--
tejun
Powered by blists - more mailing lists