[PATCH v3 0/2] cgroup: Fix cgroup_mutex deadlock through cgroup_parse_float() oops
From: Chris Down
Date: Thu Nov 26 2026 - 00:41:23 EST
With CONFIG_UCLAMP_TASK_GROUP=y on x86_64 it is possible to get
cgroup_parse_float() to oops by writing 0.00... to cpu.uclamp.min.
This alone is not great, but it's even worse because the dead writer
leaves the kernfs active reference held, so cgroup_mutex gets stuck
completely. It's also triggerable by unprivileged users on delegated
subtrees.
v3:
- First public version
- Rebase onto current cgroup/for-7.4-fixes, no code changes
v2:
- Only parse the digits after the dot (Tejun)
- Drop the selftest cases for whitespace and signs
- Rebase onto cgroup/for-7.4-fixes
v1 and v2 were sent off-list, so they are not on lore.
Chris Down (2):
cgroup: Fix divide error on long fractions in cgroup_parse_float()
selftests/cgroup: Test parsing of long fractions in cpu.uclamp.min
kernel/cgroup/cgroup.c | 29 ++++++---
tools/testing/selftests/cgroup/config | 4 ++
tools/testing/selftests/cgroup/test_cpu.c | 71 +++++++++++++++++++++++
3 files changed, 95 insertions(+), 9 deletions(-)
base-commit: c99f50e4acf86bfbbe313d79f281d83be1763260
--
2.56.1