diff options
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/hooks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 5db26468b5c3..6625699f497c 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -5588,11 +5588,11 @@ static int selinux_setprocattr(struct task_struct *p, | |||
5588 | /* Check for ptracing, and update the task SID if ok. | 5588 | /* Check for ptracing, and update the task SID if ok. |
5589 | Otherwise, leave SID unchanged and fail. */ | 5589 | Otherwise, leave SID unchanged and fail. */ |
5590 | ptsid = 0; | 5590 | ptsid = 0; |
5591 | task_lock(p); | 5591 | rcu_read_lock(); |
5592 | tracer = ptrace_parent(p); | 5592 | tracer = ptrace_parent(p); |
5593 | if (tracer) | 5593 | if (tracer) |
5594 | ptsid = task_sid(tracer); | 5594 | ptsid = task_sid(tracer); |
5595 | task_unlock(p); | 5595 | rcu_read_unlock(); |
5596 | 5596 | ||
5597 | if (tracer) { | 5597 | if (tracer) { |
5598 | error = avc_has_perm(ptsid, sid, SECCLASS_PROCESS, | 5598 | error = avc_has_perm(ptsid, sid, SECCLASS_PROCESS, |