From: Oleg Nesterov Date: Wed, 16 Dec 2009 00:47:26 +0000 (-0800) Subject: signals: check ->group_stop_count after tracehook_get_signal() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1be53963b0519bd3681749a9bed8b83aeb005cca;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git signals: check ->group_stop_count after tracehook_get_signal() 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 Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/signal.c b/kernel/signal.c index 4a9d763f8922..1814e68e4de3 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1840,11 +1840,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, @@ -1856,6 +1851,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);