Skip to content

Commit ac30d8c

Browse files
committed
Merge branch 'for-5.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup fixes from Tejun Heo: "Two cgroup fixes: - fix a NULL deref when trying to poll PSI in the root cgroup - fix confusing controller parsing corner case when mounting cgroup v1 hierarchies And doc / maintainer file updates" * 'for-5.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: update PSI file description in docs cgroup: fix psi monitor for root cgroup MAINTAINERS: Update my email address MAINTAINERS: Remove stale URLs for cpuset cgroup-v1: add disabled controller check in cgroup1_parse_param()
2 parents 25cbda4 + 74bdd45 commit ac30d8c

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

Documentation/admin-guide/cgroup-v2.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ All time durations are in microseconds.
10291029
one number is written, $MAX is updated.
10301030

10311031
cpu.pressure
1032-
A read-only nested-key file which exists on non-root cgroups.
1032+
A read-write nested-keyed file.
10331033

10341034
Shows pressure stall information for CPU. See
10351035
:ref:`Documentation/accounting/psi.rst <psi>` for details.
@@ -1475,7 +1475,7 @@ PAGE_SIZE multiple when read back.
14751475
reduces the impact on the workload and memory management.
14761476

14771477
memory.pressure
1478-
A read-only nested-key file which exists on non-root cgroups.
1478+
A read-only nested-keyed file.
14791479

14801480
Shows pressure stall information for memory. See
14811481
:ref:`Documentation/accounting/psi.rst <psi>` for details.
@@ -1714,7 +1714,7 @@ IO Interface Files
17141714
8:16 rbps=2097152 wbps=max riops=max wiops=max
17151715

17161716
io.pressure
1717-
A read-only nested-key file which exists on non-root cgroups.
1717+
A read-only nested-keyed file.
17181718

17191719
Shows pressure stall information for IO. See
17201720
:ref:`Documentation/accounting/psi.rst <psi>` for details.

MAINTAINERS

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4468,7 +4468,7 @@ F: include/linux/console*
44684468

44694469
CONTROL GROUP (CGROUP)
44704470
M: Tejun Heo <[email protected]>
4471-
M: Li Zefan <lizefan@huawei.com>
4471+
M: Zefan Li <lizefan.x@bytedance.com>
44724472
M: Johannes Weiner <[email protected]>
44734473
44744474
S: Maintained
@@ -4492,11 +4492,9 @@ F: block/blk-throttle.c
44924492
F: include/linux/blk-cgroup.h
44934493

44944494
CONTROL GROUP - CPUSET
4495-
M: Li Zefan <lizefan@huawei.com>
4495+
M: Zefan Li <lizefan.x@bytedance.com>
44964496
44974497
S: Maintained
4498-
W: http://www.bullopensource.org/cpuset/
4499-
W: http://oss.sgi.com/projects/cpusets/
45004498
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
45014499
F: Documentation/admin-guide/cgroup-v1/cpusets.rst
45024500
F: include/linux/cpuset.h

kernel/cgroup/cgroup-v1.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,9 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param)
917917
for_each_subsys(ss, i) {
918918
if (strcmp(param->key, ss->legacy_name))
919919
continue;
920+
if (!cgroup_ssid_enabled(i) || cgroup1_ssid_disabled(i))
921+
return invalfc(fc, "Disabled controller '%s'",
922+
param->key);
920923
ctx->subsys_mask |= (1 << i);
921924
return 0;
922925
}

kernel/cgroup/cgroup.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3564,6 +3564,7 @@ static ssize_t cgroup_pressure_write(struct kernfs_open_file *of, char *buf,
35643564
{
35653565
struct psi_trigger *new;
35663566
struct cgroup *cgrp;
3567+
struct psi_group *psi;
35673568

35683569
cgrp = cgroup_kn_lock_live(of->kn, false);
35693570
if (!cgrp)
@@ -3572,7 +3573,8 @@ static ssize_t cgroup_pressure_write(struct kernfs_open_file *of, char *buf,
35723573
cgroup_get(cgrp);
35733574
cgroup_kn_unlock(of->kn);
35743575

3575-
new = psi_trigger_create(&cgrp->psi, buf, nbytes, res);
3576+
psi = cgroup_ino(cgrp) == 1 ? &psi_system : &cgrp->psi;
3577+
new = psi_trigger_create(psi, buf, nbytes, res);
35763578
if (IS_ERR(new)) {
35773579
cgroup_put(cgrp);
35783580
return PTR_ERR(new);

0 commit comments

Comments
 (0)