Skip to content

Commit

Permalink
signals: collect_signal: remove the unneeded sigismember() check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Jul 25, 2008
1 parent 96347e7 commit 6715ca4
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 6715ca4

Please sign in to comment.