]> err.no Git - linux-2.6/commitdiff
signals: collect_signal: remove the unneeded sigismember() check
authorOleg Nesterov <oleg@tv-sign.ru>
Fri, 25 Jul 2008 08:47:27 +0000 (01:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Jul 2008 17:53:38 +0000 (10:53 -0700)
collect_signal() checks sigismember(&list->signal, sig), this is not
needed.  This "sig" was just found by next_signal(), so it must be valid.

We have a (completely broken) call to ->notifier in between, but it must
not play with sigpending->signal bits or unlock ->siglock.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
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>
kernel/signal.c

index 6c0958e52ea7bdac212353c2b42bbd59e702ce45..c5b9aabb1550957d9db5203992d359bac91de193 100644 (file)
@@ -343,9 +343,6 @@ static int collect_signal(int sig, struct sigpending *list, siginfo_t *info)
        struct sigqueue *q, *first = NULL;
        int still_pending = 0;
 
-       if (unlikely(!sigismember(&list->signal, sig)))
-               return 0;
-
        /*
         * Collect the siginfo appropriate to this signal.  Check if
         * there is another siginfo for the same signal.