From: Oleg Nesterov Date: Fri, 25 Jul 2008 08:47:27 +0000 (-0700) Subject: signals: collect_signal: remove the unneeded sigismember() check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6715ca451cfff1c9ce4b33ad9918a1dacf43997c;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git signals: collect_signal: remove the unneeded sigismember() check 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 Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/signal.c b/kernel/signal.c index 6c0958e52ea7..c5b9aabb1550 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -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.