aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/capability.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/capability.c')
-rw-r--r--kernel/capability.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/capability.c b/kernel/capability.c
index d4377c5a36c9..0d0d886d1e84 100644
--- a/kernel/capability.c
+++ b/kernel/capability.c
@@ -63,8 +63,7 @@ asmlinkage long sys_capget(cap_user_header_t header, cap_user_data_t dataptr)
63 read_lock(&tasklist_lock); 63 read_lock(&tasklist_lock);
64 64
65 if (pid && pid != task_pid_vnr(current)) { 65 if (pid && pid != task_pid_vnr(current)) {
66 target = find_task_by_pid_ns(pid, 66 target = find_task_by_vpid(pid);
67 current->nsproxy->pid_ns);
68 if (!target) { 67 if (!target) {
69 ret = -ESRCH; 68 ret = -ESRCH;
70 goto out; 69 goto out;
@@ -198,8 +197,7 @@ asmlinkage long sys_capset(cap_user_header_t header, const cap_user_data_t data)
198 read_lock(&tasklist_lock); 197 read_lock(&tasklist_lock);
199 198
200 if (pid > 0 && pid != task_pid_vnr(current)) { 199 if (pid > 0 && pid != task_pid_vnr(current)) {
201 target = find_task_by_pid_ns(pid, 200 target = find_task_by_vpid(pid);
202 current->nsproxy->pid_ns);
203 if (!target) { 201 if (!target) {
204 ret = -ESRCH; 202 ret = -ESRCH;
205 goto out; 203 goto out;