summaryrefslogtreecommitdiffstats
path: root/security/yama/yama_lsm.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-04-09 15:57:27 +0200
committerArnd Bergmann <arnd@arndb.de>2013-04-09 16:02:14 +0200
commit71f6424023cb9fa381efc7237ca05926b2b1ca9a (patch)
tree6c3c4a2110d0ff3d73c4bacaddb23b9295663695 /security/yama/yama_lsm.c
parent9bc128e16bb82c046d6972171de572affc5c4cbf (diff)
parente933a1a12a02f42e0013cda87bba37ccb59efc47 (diff)
Merge branch 'mxs/cleanup' into next/multiplatform
This is a dependency for mxs/multiplatform Signed-off-by: Arnd Bergmann <arnd@arndb.de> Conflicts: drivers/clocksource/Makefile
Diffstat (limited to 'security/yama/yama_lsm.c')
-rw-r--r--security/yama/yama_lsm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c
index 23414b93771..13c88fbcf03 100644
--- a/security/yama/yama_lsm.c
+++ b/security/yama/yama_lsm.c
@@ -347,10 +347,8 @@ int yama_ptrace_traceme(struct task_struct *parent)
/* Only disallow PTRACE_TRACEME on more aggressive settings. */
switch (ptrace_scope) {
case YAMA_SCOPE_CAPABILITY:
- rcu_read_lock();
- if (!ns_capable(__task_cred(parent)->user_ns, CAP_SYS_PTRACE))
+ if (!has_ns_capability(parent, current_user_ns(), CAP_SYS_PTRACE))
rc = -EPERM;
- rcu_read_unlock();
break;
case YAMA_SCOPE_NO_ATTACH:
rc = -EPERM;