diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-14 18:11:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-14 18:11:19 -0400 |
commit | 352526f45387cb96671f13b003bdd5b249e509bd (patch) | |
tree | 9f1fa71f134ebe801c98532a36ff257f2b8043a7 | |
parent | 6517569d4ef33fe52b0d0ce8161349a55f88dded (diff) | |
parent | b6a6759daf55dade2b65089957832759d502acfb (diff) |
Merge branch 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup fixes from Tejun Heo:
"Three cgroup fixes. Nothing critical:
- the pids controller could trigger suspicious RCU warning
spuriously. Fixed.
- in the debug controller, %p -> %pK to protect kernel pointer
from getting exposed.
- documentation formatting fix"
* 'for-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
cgroups: censor kernel pointer in debug files
cgroup/pids: remove spurious suspicious RCU usage warning
cgroup: Fix indenting in PID controller documentation
-rw-r--r-- | Documentation/cgroup-v2.txt | 11 | ||||
-rw-r--r-- | kernel/cgroup/cgroup-v1.c | 2 | ||||
-rw-r--r-- | kernel/cgroup/pids.c | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/Documentation/cgroup-v2.txt b/Documentation/cgroup-v2.txt index 3b8449f8ac7e..49d7c997fa1e 100644 --- a/Documentation/cgroup-v2.txt +++ b/Documentation/cgroup-v2.txt | |||
@@ -1142,16 +1142,17 @@ used by the kernel. | |||
1142 | 1142 | ||
1143 | pids.max | 1143 | pids.max |
1144 | 1144 | ||
1145 | A read-write single value file which exists on non-root cgroups. The | 1145 | A read-write single value file which exists on non-root |
1146 | default is "max". | 1146 | cgroups. The default is "max". |
1147 | 1147 | ||
1148 | Hard limit of number of processes. | 1148 | Hard limit of number of processes. |
1149 | 1149 | ||
1150 | pids.current | 1150 | pids.current |
1151 | 1151 | ||
1152 | A read-only single value file which exists on all cgroups. | 1152 | A read-only single value file which exists on all cgroups. |
1153 | 1153 | ||
1154 | The number of processes currently in the cgroup and its descendants. | 1154 | The number of processes currently in the cgroup and its |
1155 | descendants. | ||
1155 | 1156 | ||
1156 | Organisational operations are not blocked by cgroup policies, so it is | 1157 | Organisational operations are not blocked by cgroup policies, so it is |
1157 | possible to have pids.current > pids.max. This can be done by either | 1158 | possible to have pids.current > pids.max. This can be done by either |
diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c index 56eba9caa632..1dc22f6b49f5 100644 --- a/kernel/cgroup/cgroup-v1.c +++ b/kernel/cgroup/cgroup-v1.c | |||
@@ -1329,7 +1329,7 @@ static int cgroup_css_links_read(struct seq_file *seq, void *v) | |||
1329 | struct task_struct *task; | 1329 | struct task_struct *task; |
1330 | int count = 0; | 1330 | int count = 0; |
1331 | 1331 | ||
1332 | seq_printf(seq, "css_set %p\n", cset); | 1332 | seq_printf(seq, "css_set %pK\n", cset); |
1333 | 1333 | ||
1334 | list_for_each_entry(task, &cset->tasks, cg_list) { | 1334 | list_for_each_entry(task, &cset->tasks, cg_list) { |
1335 | if (count++ > MAX_TASKS_SHOWN_PER_CSS) | 1335 | if (count++ > MAX_TASKS_SHOWN_PER_CSS) |
diff --git a/kernel/cgroup/pids.c b/kernel/cgroup/pids.c index e756dae49300..2237201d66d5 100644 --- a/kernel/cgroup/pids.c +++ b/kernel/cgroup/pids.c | |||
@@ -229,7 +229,7 @@ static int pids_can_fork(struct task_struct *task) | |||
229 | /* Only log the first time events_limit is incremented. */ | 229 | /* Only log the first time events_limit is incremented. */ |
230 | if (atomic64_inc_return(&pids->events_limit) == 1) { | 230 | if (atomic64_inc_return(&pids->events_limit) == 1) { |
231 | pr_info("cgroup: fork rejected by pids controller in "); | 231 | pr_info("cgroup: fork rejected by pids controller in "); |
232 | pr_cont_cgroup_path(task_cgroup(current, pids_cgrp_id)); | 232 | pr_cont_cgroup_path(css->cgroup); |
233 | pr_cont("\n"); | 233 | pr_cont("\n"); |
234 | } | 234 | } |
235 | cgroup_file_notify(&pids->events_file); | 235 | cgroup_file_notify(&pids->events_file); |