aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/capability.c2
-rw-r--r--kernel/pid.c12
2 files changed, 13 insertions, 1 deletions
diff --git a/kernel/capability.c b/kernel/capability.c
index 0d0d886d1e84..efbd9cdce132 100644
--- a/kernel/capability.c
+++ b/kernel/capability.c
@@ -96,7 +96,7 @@ static inline int cap_set_pg(int pgrp_nr, kernel_cap_t *effective,
96 int found = 0; 96 int found = 0;
97 struct pid *pgrp; 97 struct pid *pgrp;
98 98
99 pgrp = find_pid_ns(pgrp_nr, current->nsproxy->pid_ns); 99 pgrp = find_vpid(pgrp_nr);
100 do_each_pid_task(pgrp, PIDTYPE_PGID, g) { 100 do_each_pid_task(pgrp, PIDTYPE_PGID, g) {
101 target = g; 101 target = g;
102 while_each_thread(g, target) { 102 while_each_thread(g, target) {
diff --git a/kernel/pid.c b/kernel/pid.c
index bed9e7f80a50..8040533d1a04 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -302,6 +302,18 @@ struct pid * fastcall find_pid_ns(int nr, struct pid_namespace *ns)
302} 302}
303EXPORT_SYMBOL_GPL(find_pid_ns); 303EXPORT_SYMBOL_GPL(find_pid_ns);
304 304
305struct pid *find_vpid(int nr)
306{
307 return find_pid_ns(nr, current->nsproxy->pid_ns);
308}
309EXPORT_SYMBOL_GPL(find_vpid);
310
311struct pid *find_pid(int nr)
312{
313 return find_pid_ns(nr, &init_pid_ns);
314}
315EXPORT_SYMBOL_GPL(find_pid);
316
305/* 317/*
306 * attach_pid() must be called with the tasklist_lock write-held. 318 * attach_pid() must be called with the tasklist_lock write-held.
307 */ 319 */