lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <906caca3-8564-4443-a1bd-3c18449b0d64@huaweicloud.com>
Date: Wed, 18 Jun 2025 17:03:47 +0800
From: Chen Ridong <chenridong@...weicloud.com>
To: Michal Koutný <mkoutny@...e.com>
Cc: tj@...nel.org, hannes@...xchg.org, 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 2025/6/18 16:42, Michal Koutný wrote:
> On Wed, Jun 18, 2025 at 07:32:17AM +0000, Chen Ridong <chenridong@...weicloud.com> wrote:
>> From: Chen Ridong <chenridong@...wei.com>
>>
>> An issue was found:
> 
> An obligatory reminder to move to freezer in the unifier hierarchy if
> possible. Thanks for the fix though.
> 
Thanks, we are trying to switch to cgroup v2. However some products are
still using cgroup v1.

Thank you for your review.

BR,
Ridong

>>
>> 	# 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>
>> ---
>>  kernel/cgroup/legacy_freezer.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> Acked-by: Michal Koutný <mkoutny@...e.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ