public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] do_signal_stop: use signal_group_exit()
@ 2008-02-15 18:02 Oleg Nesterov
  2008-02-16  3:37 ` Andrew Morton
  0 siblings, 1 reply; 15+ messages in thread
From: Oleg Nesterov @ 2008-02-15 18:02 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Roland McGrath, linux-kernel

do_signal_stop() needs signal_group_exit() but checks sig->group_exit_task.
This (optimization) is correct, SIGNAL_STOP_DEQUEUED and SIGNAL_GROUP_EXIT
are mutually exclusive, but looks confusing. Use signal_group_exit(), this
is not fastpath, the code clarity is more important.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- 25/kernel/signal.c~6_DO_SIGNAL_STOP	2008-02-15 16:59:17.000000000 +0300
+++ 25/kernel/signal.c	2008-02-15 20:34:32.000000000 +0300
@@ -1718,7 +1718,7 @@ static int do_signal_stop(int signr)
 		struct task_struct *t;
 
 		if (!likely(sig->flags & SIGNAL_STOP_DEQUEUED) ||
-		    unlikely(sig->group_exit_task))
+		    unlikely(signal_group_exit(sig)))
 			return 0;
 		/*
 		 * There is no group stop already in progress.


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

end of thread, other threads:[~2008-02-22  9:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-15 18:02 [PATCH] do_signal_stop: use signal_group_exit() Oleg Nesterov
2008-02-16  3:37 ` Andrew Morton
2008-02-16 14:02   ` Oleg Nesterov
2008-02-17 23:10     ` Oleg Nesterov
2008-02-18  4:11       ` Eric W. Biederman
2008-02-19 23:39         ` Valdis.Kletnieks
2008-02-20 16:14           ` [PATCH] (for -mm only) put_pid: make sure we don't free the live pid Oleg Nesterov
2008-02-20 16:18           ` tty && pid problems Oleg Nesterov
2008-02-20 16:19             ` Alan Cox
2008-02-22  1:39               ` Eric W. Biederman
2008-02-22  9:37                 ` Alan Cox
2008-02-20 16:28             ` Oleg Nesterov
2008-02-20 19:00               ` Jiri Slaby
2008-02-20  2:32       ` [PATCH] do_signal_stop: use signal_group_exit() Eric W. Biederman
2008-02-16 15:09   ` [PATCH] free_pidmap: turn it into free_pidmap(struct upid *) Oleg Nesterov

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