From: Chris Down <chris@chrisdown.name>
To: tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com,
shakeel.butt@linux.dev
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/2] cgroup: Fix cgroup_mutex deadlock through cgroup_parse_float() oops
Date: Wed, 25 Nov 2026 21:41:12 -0800 [thread overview]
Message-ID: <cover.1795671629.git.chris@chrisdown.name> (raw)
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
next reply other threads:[~2026-11-26 5:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 5:41 Chris Down [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1795671629.git.chris@chrisdown.name \
--to=chris@chrisdown.name \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=shakeel.butt@linux.dev \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox