public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] signals: check ->group_stop_count after tracehook_get_signal()
@ 2009-10-29 23:57 Oleg Nesterov
  0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2009-10-29 23:57 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Roland McGrath, linux-kernel

Move the call to do_signal_stop() down, after tracehook call.
This makes ->group_stop_count condition visible to tracers before
do_signal_stop() will participate in this group-stop.

Currently the patch has no effect, tracehook_get_signal() always
returns 0.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
---

 kernel/signal.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

--- V1/kernel/signal.c~2_DO_SIGNAL_STOP_AFTER_TRACEHOOK	2009-10-30 00:44:20.000000000 +0100
+++ V1/kernel/signal.c	2009-10-30 00:53:02.000000000 +0100
@@ -1807,11 +1807,6 @@ relock:
 
 	for (;;) {
 		struct k_sigaction *ka;
-
-		if (unlikely(signal->group_stop_count > 0) &&
-		    do_signal_stop(0))
-			goto relock;
-
 		/*
 		 * Tracing can induce an artifical signal and choose sigaction.
 		 * The return value in @signr determines the default action,
@@ -1823,6 +1818,10 @@ relock:
 		if (unlikely(signr != 0))
 			ka = return_ka;
 		else {
+			if (unlikely(signal->group_stop_count > 0) &&
+			    do_signal_stop(0))
+				goto relock;
+
 			signr = dequeue_signal(current, &current->blocked,
 					       info);
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-30  0:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-29 23:57 [PATCH] signals: check ->group_stop_count after tracehook_get_signal() Oleg Nesterov

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