public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ptrace: do_notify_parent_cldstop: fix the wrong ->nsproxy usage
@ 2009-05-25 18:55 Oleg Nesterov
  2009-05-25 19:39 ` Oleg Nesterov
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Oleg Nesterov @ 2009-05-25 18:55 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Christoph Hellwig, Ingo Molnar, Pavel Emelyanov, Roland McGrath,
	Sukadev Bhattiprolu, linux-kernel

If the non-traced sub-thread calls do_notify_parent_cldstop(), we send the
notification to group_leader->real_parent and we report group_leader's pid.

But, if group_leader is traced we use the wrong ->parent->nsproxy->pid_ns,
the tracer and parent can live in different namespaces. Change the code
to use "parent" instead of tsk->parent.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>

--- PTRACE/kernel/signal.c~CLDSTOP_NS	2009-05-25 20:24:50.000000000 +0200
+++ PTRACE/kernel/signal.c	2009-05-25 20:33:37.000000000 +0200
@@ -1496,7 +1496,7 @@ static void do_notify_parent_cldstop(str
 	 * see comment in do_notify_parent() abot the following 3 lines
 	 */
 	rcu_read_lock();
-	info.si_pid = task_pid_nr_ns(tsk, tsk->parent->nsproxy->pid_ns);
+	info.si_pid = task_pid_nr_ns(tsk, parent->nsproxy->pid_ns);
 	info.si_uid = __task_cred(tsk)->uid;
 	rcu_read_unlock();
 


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2009-06-17 14:35 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-25 18:55 [PATCH 1/1] ptrace: do_notify_parent_cldstop: fix the wrong ->nsproxy usage Oleg Nesterov
2009-05-25 19:39 ` Oleg Nesterov
2009-05-27  1:06   ` Roland McGrath
2009-05-27 23:24     ` Oleg Nesterov
2009-05-26 21:05 ` Roland McGrath
2009-05-26 21:33   ` Oleg Nesterov
2009-05-27  0:55     ` Roland McGrath
2009-06-02  4:54       ` Sukadev Bhattiprolu
2009-06-05 15:43         ` naresh kamboju
2009-06-06  0:19           ` Roland McGrath
2009-06-06  6:47           ` open_posix_testsuite: STOP + CONT + wait hang? Oleg Nesterov
2009-06-17  8:35             ` naresh kamboju
2009-06-17 13:29               ` Oleg Nesterov
2009-06-17 14:34                 ` naresh kamboju
2009-05-27 21:32   ` [PATCH 1/1] ptrace: do_notify_parent_cldstop: fix the wrong ->nsproxy usage Oleg Nesterov
2009-05-27 22:23     ` Roland McGrath
2009-05-27 23:12       ` Oleg Nesterov
2009-05-27 23:26         ` Roland McGrath
2009-05-27 23:43           ` Oleg Nesterov
2009-05-27 23:51             ` Roland McGrath
2009-05-28  0:05               ` Oleg Nesterov
2009-06-02  4:48 ` Sukadev Bhattiprolu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox