mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] cgroup: Fix cgroup_mutex deadlock through cgroup_parse_float() oops
@ 2026-11-26  5:41 Chris Down
  2026-11-26  5:41 ` [PATCH v3 1/2] cgroup: Fix divide error on long fractions in cgroup_parse_float() Chris Down
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Down @ 2026-11-26  5:41 UTC (permalink / raw)
  To: tj, hannes, mkoutny, shakeel.butt; +Cc: cgroups, linux-kernel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-26 11:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-26  5:41 [PATCH v3 0/2] cgroup: Fix cgroup_mutex deadlock through cgroup_parse_float() oops Chris Down
2026-11-26  5:41 ` [PATCH v3 1/2] cgroup: Fix divide error on long fractions in cgroup_parse_float() Chris Down
2026-11-26  5:41 ` [PATCH v3 2/2] selftests/cgroup: Test parsing of long fractions in cpu.uclamp.min Chris Down
2026-11-26 11:32 ` [PATCH v3 0/2] cgroup: Fix cgroup_mutex deadlock through cgroup_parse_float() oops Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®