summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2026-09-02 13:03:13 -1000
committerTejun Heo <tj@kernel.org>2026-09-08 09:28:48 -1000
commitc367ce5b31ffd4d958f3f6c5fe1c9e820dc9f526 (patch)
tree681b39042b7aec350b7e081d873331019d67048c /tools/perf/scripts/python
parent67499cd07ba93dc643ca5624b7dc947f0354ace2 (diff)
downloadlinux-next-c367ce5b31ffd4d958f3f6c5fe1c9e820dc9f526.tar.gz
linux-next-c367ce5b31ffd4d958f3f6c5fe1c9e820dc9f526.zip
cgroup: Make the offline drain interruptible
cgroup_subtree_control_write() and cgroup_type_write() drain dying csses from the subtree before re-applying control, so that a controller being re-enabled gets a fresh css instead of adopting one that is still dying. The drain waits for offline_css() in TASK_UNINTERRUPTIBLE. Since 1dffd95575eb ("cgroup: Defer kill_css_finish() in cgroup_apply_control_disable()"), a disabled css offlines only after every task that still pins it has finished exiting. The root cause of the hang is an indefinite wait in a place where indefinite waits should not happen: a task past exit_signals() can block in its exit path for as long as, say, a FUSE daemon takes to answer a flush, and nothing can interrupt it because prepare_signal() drops every signal for an exiting group. The drain then escalated that into an uninterruptible wait for the writer, which sits in D state for as long as the exiting task does. That is the hang syzbot reports as "task hung in cgroup_subtree_control_write". Make the drain interruptible. Nothing has been modified when it runs, so the write restarts or fails with EINTR without side effects. cgroup1 mount and remount drain the same way and become interruptible too. cgroup_destroy_root() drains from a workqueue where no signal is ever pending and keeps waiting as before. This only stops the escalation. The write still waits for the exiting tasks, and the indefinite wait in the exit path remains a separate problem. Fixes: 1dffd95575eb ("cgroup: Defer kill_css_finish() in cgroup_apply_control_disable()") Reported-by: syzbot+bb2e19a1190a556c01b1@syzkaller.appspotmail.com Link: https://lore.kernel.org/all/6a23a4b4.e4db5ad2.3b7dfb.0000.GAE@google.com/ Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions