diff options
author | Oleg Nesterov <oleg@redhat.com> | 2009-12-15 19:47:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:20:09 -0500 |
commit | 1be53963b0519bd3681749a9bed8b83aeb005cca (patch) | |
tree | 0bc6497a8039021f781f1c902f59e6f71f772793 /kernel | |
parent | ad09750b51150ca87531b8790a379214a974c167 (diff) |
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 <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/signal.c | 9 |
1 files changed, 4 insertions, 5 deletions
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: | |||
1840 | 1840 | ||
1841 | for (;;) { | 1841 | for (;;) { |
1842 | struct k_sigaction *ka; | 1842 | struct k_sigaction *ka; |
1843 | |||
1844 | if (unlikely(signal->group_stop_count > 0) && | ||
1845 | do_signal_stop(0)) | ||
1846 | goto relock; | ||
1847 | |||
1848 | /* | 1843 | /* |
1849 | * Tracing can induce an artifical signal and choose sigaction. | 1844 | * Tracing can induce an artifical signal and choose sigaction. |
1850 | * The return value in @signr determines the default action, | 1845 | * The return value in @signr determines the default action, |
@@ -1856,6 +1851,10 @@ relock: | |||
1856 | if (unlikely(signr != 0)) | 1851 | if (unlikely(signr != 0)) |
1857 | ka = return_ka; | 1852 | ka = return_ka; |
1858 | else { | 1853 | else { |
1854 | if (unlikely(signal->group_stop_count > 0) && | ||
1855 | do_signal_stop(0)) | ||
1856 | goto relock; | ||
1857 | |||
1859 | signr = dequeue_signal(current, ¤t->blocked, | 1858 | signr = dequeue_signal(current, ¤t->blocked, |
1860 | info); | 1859 | info); |
1861 | 1860 | ||