cgroup: Fix cgroup_mutex deadlock through cgroup_parse_float() oops
Get series with b4
b4 am [email protected]Versions newest first
- v3 Latest2 patches 1 replyIn review
Changes in v3 from the cover letter
- First public version
- Rebase onto current cgroup/for-7.4-fixes, no code changes
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | cgroup: Fix divide error on long fractions in cgroup_parse_float()kernel/ | +20 | 0 replies | |
| 2/2 | selftests/cgroup: Test parsing of long fractions in cpu.uclamp.mintools/ tools/ | +75 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/2] cgroup: Fix cgroup_mutex deadlock through cgroup_parse_float() oops
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
Signature · 1 line
2.56.1