Check ->group_stop_count before dequeue_signal(). If it is true and
we don't have ->interrupt/etc events to report, we should return to
participate in group-stop.

Please note again that this (and the previous) patches in fact do not
change the behaviour "too much". Since we drop ->siglock it is quite
possible we can report (say) UTRACE_SIGNAL_REPORT when group_stop_count
is not zero.

Signed-off-by: Oleg Nesterov <o...@redhat.com>
---

 kernel/utrace.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- __UTRACE/kernel/utrace.c~2_utrace_signal_ck_jctl    2009-10-22 
20:50:49.000000000 +0200
+++ __UTRACE/kernel/utrace.c    2009-10-22 23:08:26.000000000 +0200
@@ -1944,10 +1944,12 @@ int utrace_get_signal(struct task_struct
                event = 0;
                ka = NULL;
                memset(return_ka, 0, sizeof *return_ka);
-       } else if ((task->utrace_flags & UTRACE_EVENT_SIGNAL_ALL) == 0) {
+       } else if (!(task->utrace_flags & UTRACE_EVENT_SIGNAL_ALL) ||
+                       unlikely(task->signal->group_stop_count)) {
                /*
-                * If no engine is interested in intercepting signals,
-                * let the caller just dequeue them normally.
+                * If no engine is interested in intercepting signals or
+                * we must stop, let the caller just dequeue them normally
+                * or participate in group-stop.
                 */
                return 0;
        } else {

Reply via email to