Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'cgroup-for-6.16-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup

Pull cgroup fixes from Tejun Heo:
"An earlier commit to suppress a warning introduced a race condition
where tasks can escape cgroup1 freezer. Revert the commit and simply
remove the warning which was spurious to begin with"

* tag 'cgroup-for-6.16-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
Revert "cgroup_freezer: cgroup_freezing: Check if not frozen"
sched,freezer: Remove unnecessary warning in __thaw_task

+4 -19
+1 -7
kernel/cgroup/legacy_freezer.c
··· 66 66 bool cgroup_freezing(struct task_struct *task) 67 67 { 68 68 bool ret; 69 - unsigned int state; 70 69 71 70 rcu_read_lock(); 72 - /* Check if the cgroup is still FREEZING, but not FROZEN. The extra 73 - * !FROZEN check is required, because the FREEZING bit is not cleared 74 - * when the state FROZEN is reached. 75 - */ 76 - state = task_freezer(task)->state; 77 - ret = (state & CGROUP_FREEZING) && !(state & CGROUP_FROZEN); 71 + ret = task_freezer(task)->state & CGROUP_FREEZING; 78 72 rcu_read_unlock(); 79 73 80 74 return ret;
+3 -12
kernel/freezer.c
··· 201 201 202 202 void __thaw_task(struct task_struct *p) 203 203 { 204 - unsigned long flags; 205 - 206 - spin_lock_irqsave(&freezer_lock, flags); 207 - if (WARN_ON_ONCE(freezing(p))) 208 - goto unlock; 209 - 210 - if (!frozen(p) || task_call_func(p, __restore_freezer_state, NULL)) 211 - goto unlock; 212 - 213 - wake_up_state(p, TASK_FROZEN); 214 - unlock: 215 - spin_unlock_irqrestore(&freezer_lock, flags); 204 + guard(spinlock_irqsave)(&freezer_lock); 205 + if (frozen(p) && !task_call_func(p, __restore_freezer_state, NULL)) 206 + wake_up_state(p, TASK_FROZEN); 216 207 } 217 208 218 209 /**