]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dtrace: correct signal-handle probe semantics
authorKris Van Hees <kris.van.hees@oracle.com>
Wed, 14 Oct 2015 09:27:44 +0000 (05:27 -0400)
committerKris Van Hees <kris.van.hees@oracle.com>
Fri, 13 Nov 2015 08:18:15 +0000 (03:18 -0500)
The proc:::signal-handle probe should fire when a signal is presented
to a task for handling, regardless of the handler settings.  Previously,
we were only firing this probe when the signal actually had a specific
handler associated with it.

Orabug: 21974641
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Acked-by: Nick Alcock <nick.alcock@oracle.com>
kernel/signal.c

index 7d3de199c1976a6a3a7ab8b933e251a2bb868029..f337fd006bc5bc7e021d3ced8bf7f6335ecfd1c2 100644 (file)
@@ -2266,6 +2266,11 @@ relock:
 
                ka = &sighand->action[signr-1];
 
+               DTRACE_PROC3(signal__handle, int, signr, siginfo_t *,
+                            ksig->ka.sa.sa_handler != SIG_DFL ? NULL :
+                            &ksig->info, void (*)(void),
+                            ksig->ka.sa.sa_handler);
+
                /* Trace actually delivered signals. */
                trace_signal_deliver(signr, &ksig->info, ka);
 
@@ -2365,12 +2370,6 @@ relock:
        }
        spin_unlock_irq(&sighand->siglock);
 
-       if (signr != 0) {
-               DTRACE_PROC3(signal__handle, int, signr, siginfo_t *,
-                            ksig->ka.sa.sa_handler != SIG_DFL ? NULL :
-                            &ksig->info, void (*)(void),
-                            ksig->ka.sa.sa_handler);
-       }
        ksig->sig = signr;
        return ksig->sig > 0;
 }