diff options
Diffstat (limited to 'kernel/capability.c')
-rw-r--r-- | kernel/capability.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/capability.c b/kernel/capability.c index 7f876e60521f..2f05303715a5 100644 --- a/kernel/capability.c +++ b/kernel/capability.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/syscalls.h> | 15 | #include <linux/syscalls.h> |
16 | #include <linux/pid_namespace.h> | 16 | #include <linux/pid_namespace.h> |
17 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
18 | #include "cred-internals.h" | ||
19 | 18 | ||
20 | /* | 19 | /* |
21 | * Leveraged for setting/resetting capabilities | 20 | * Leveraged for setting/resetting capabilities |
@@ -135,7 +134,7 @@ static inline int cap_get_target_pid(pid_t pid, kernel_cap_t *pEp, | |||
135 | if (pid && (pid != task_pid_vnr(current))) { | 134 | if (pid && (pid != task_pid_vnr(current))) { |
136 | struct task_struct *target; | 135 | struct task_struct *target; |
137 | 136 | ||
138 | read_lock(&tasklist_lock); | 137 | rcu_read_lock(); |
139 | 138 | ||
140 | target = find_task_by_vpid(pid); | 139 | target = find_task_by_vpid(pid); |
141 | if (!target) | 140 | if (!target) |
@@ -143,7 +142,7 @@ static inline int cap_get_target_pid(pid_t pid, kernel_cap_t *pEp, | |||
143 | else | 142 | else |
144 | ret = security_capget(target, pEp, pIp, pPp); | 143 | ret = security_capget(target, pEp, pIp, pPp); |
145 | 144 | ||
146 | read_unlock(&tasklist_lock); | 145 | rcu_read_unlock(); |
147 | } else | 146 | } else |
148 | ret = security_capget(current, pEp, pIp, pPp); | 147 | ret = security_capget(current, pEp, pIp, pPp); |
149 | 148 | ||