[PATCH 5/7] signals: check ->group_stop_count after tracehook_get_signal()
Oleg Nesterov
oleg at redhat.com
Mon Oct 26 03:28:50 UTC 2009
No functional changes, preparation for utrace-ptrace.
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 at redhat.com>
---
kernel/signal.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- V1/kernel/signal.c~5_DO_SIGNAL_STOP_AFTER_TRACEHOOK 2009-10-26 00:43:05.000000000 +0100
+++ V1/kernel/signal.c 2009-10-26 01:01:47.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, ¤t->blocked,
info);
More information about the utrace-devel
mailing list