utrace_get_signal() checks JOBCTL_STOP_PENDING to detect the
case when we should not try to dequeue the signal but should
try to participate in the group-stop.

With the recent changes this is not enough, everything which
contrbutes to recalc_sigpending_tsk() should be respected.

Check JOBCTL_PENDING_MASK instead. This matches the
JOBCTL_STOP_PENDING | JOBCTL_TRAP_MASK code in the caller,
get_signal_to_deliver(). Note that this code won't run if
utrace_get_signal() returns signr > 0.

Signed-off-by: Oleg Nesterov <o...@redhat.com>
---
 kernel/utrace.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/utrace.c b/kernel/utrace.c
index d41b982..0bb0a06 100644
--- a/kernel/utrace.c
+++ b/kernel/utrace.c
@@ -2027,7 +2027,7 @@ int utrace_get_signal(struct task_struct *task, struct 
pt_regs *regs,
                ka = NULL;
                memset(return_ka, 0, sizeof *return_ka);
        } else if (!(task->utrace_flags & UTRACE_EVENT_SIGNAL_ALL) ||
-                  unlikely(task->jobctl & JOBCTL_STOP_PENDING)) {
+                  unlikely(task->jobctl & JOBCTL_PENDING_MASK)) {
                /*
                 * If no engine is interested in intercepting signals or
                 * we must stop, let the caller just dequeue them normally
-- 
1.5.5.1


Reply via email to