aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorSasha Levin <levinsasha928@gmail.com>2012-05-17 17:31:39 -0400
committerEric W. Biederman <ebiederm@xmission.com>2012-05-17 18:50:06 -0400
commit8ca937a668d4be0b0c89c4fc9a912a5885ac06fe (patch)
tree085d17219a0bbb7bd17eb60aab028256b2b5948d /kernel/exit.c
parentb38a86eb196d9402299919456fe3f28e490c76fa (diff)
cred: use correct cred accessor with regards to rcu read lock
Commit "userns: Convert setting and getting uid and gid system calls to use kuid and kgid has modified the accessors in wait_task_continued() and wait_task_stopped() to use __task_cred() instead of task_uid(). __task_cred() assumes that we're inside a rcu read lock, which is untrue for these two functions. Modify it to use task_uid() instead. Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 789e3c5777f7..910a0716e17a 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1427,7 +1427,7 @@ static int wait_task_stopped(struct wait_opts *wo,
1427 if (!unlikely(wo->wo_flags & WNOWAIT)) 1427 if (!unlikely(wo->wo_flags & WNOWAIT))
1428 *p_code = 0; 1428 *p_code = 0;
1429 1429
1430 uid = from_kuid_munged(current_user_ns(), __task_cred(p)->uid); 1430 uid = from_kuid_munged(current_user_ns(), task_uid(p));
1431unlock_sig: 1431unlock_sig:
1432 spin_unlock_irq(&p->sighand->siglock); 1432 spin_unlock_irq(&p->sighand->siglock);
1433 if (!exit_code) 1433 if (!exit_code)
@@ -1500,7 +1500,7 @@ static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
1500 } 1500 }
1501 if (!unlikely(wo->wo_flags & WNOWAIT)) 1501 if (!unlikely(wo->wo_flags & WNOWAIT))
1502 p->signal->flags &= ~SIGNAL_STOP_CONTINUED; 1502 p->signal->flags &= ~SIGNAL_STOP_CONTINUED;
1503 uid = from_kuid_munged(current_user_ns(), __task_cred(p)->uid); 1503 uid = from_kuid_munged(current_user_ns(), task_uid(p));
1504 spin_unlock_irq(&p->sighand->siglock); 1504 spin_unlock_irq(&p->sighand->siglock);
1505 1505
1506 pid = task_pid_vnr(p); 1506 pid = task_pid_vnr(p);