mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] signals: collect_signal: remove the unneeded sigismember() check
@ 2008-05-17 15:14 Oleg Nesterov
  2008-05-21  0:56 ` Roland McGrath
  0 siblings, 1 reply; 5+ messages in thread
From: Oleg Nesterov @ 2008-05-17 15:14 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linus Torvalds, Roland McGrath, linux-kernel

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>

--- 25/kernel/signal.c~7_CS_NO_CHECK	2008-05-17 18:07:10.000000000 +0400
+++ 25/kernel/signal.c	2008-05-17 18:41:28.000000000 +0400
@@ -309,9 +309,6 @@ static int collect_signal(int sig, struc
 	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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-05-21 13:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-17 15:14 [PATCH 1/2] signals: collect_signal: remove the unneeded sigismember() check Oleg Nesterov
2008-05-21  0:56 ` Roland McGrath
2008-05-21  2:14   ` Linus Torvalds
2008-05-21  2:56     ` Roland McGrath
2008-05-21 12:20       ` Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®