From 2070135c404f3918e9a4b57263a3703a3fb57431 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Thu, 31 May 2012 16:26:39 -0700 Subject: [PATCH] --- yaml --- r: 309771 b: refs/heads/master c: 3208450488ae724196f1efffc457e4265957c04e h: refs/heads/master i: 309769: 9789e98f8a921b338c4a1ae946a0b18ed999966c 309767: ae2963e784cbbdec9de79e5f8f41427274da22fe v: v3 --- [refs] | 2 +- trunk/kernel/signal.c | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 4ec9060a2fa0..8069effec731 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9eaa3d9bb2c4da99b1161cfcc63f3e77d9d3d156 +refs/heads/master: 3208450488ae724196f1efffc457e4265957c04e diff --git a/trunk/kernel/signal.c b/trunk/kernel/signal.c index f7b418217633..08dfbd748cd2 100644 --- a/trunk/kernel/signal.c +++ b/trunk/kernel/signal.c @@ -1656,19 +1656,18 @@ bool do_notify_parent(struct task_struct *tsk, int sig) info.si_signo = sig; info.si_errno = 0; /* - * we are under tasklist_lock here so our parent is tied to - * us and cannot exit and release its namespace. + * We are under tasklist_lock here so our parent is tied to + * us and cannot change. * - * the only it can is to switch its nsproxy with sys_unshare, - * bu uncharing pid namespaces is not allowed, so we'll always - * see relevant namespace + * task_active_pid_ns will always return the same pid namespace + * until a task passes through release_task. * * write_lock() currently calls preempt_disable() which is the * same as rcu_read_lock(), but according to Oleg, this is not * correct to rely on this */ rcu_read_lock(); - info.si_pid = task_pid_nr_ns(tsk, tsk->parent->nsproxy->pid_ns); + info.si_pid = task_pid_nr_ns(tsk, task_active_pid_ns(tsk->parent)); info.si_uid = from_kuid_munged(task_cred_xxx(tsk->parent, user_ns), task_uid(tsk)); rcu_read_unlock();