public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH rc1-mm 3/3] coredump: copy_process: don't check SIGNAL_GROUP_EXIT
@ 2006-04-09  0:11 Oleg Nesterov
  2006-04-10  7:13 ` Roland McGrath
  0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2006-04-09  0:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Eric W. Biederman, Ingo Molnar, Paul E. McKenney, Roland McGrath,
	Andrew Morton, Lee Revell

After the previous patch SIGNAL_GROUP_EXIT implies a pending SIGKILL,
we can remove this check from copy_process() because we already checked
!signal_pending().

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

--- MM/kernel/fork.c~3_fork	2006-03-23 22:59:33.000000000 +0300
+++ MM/kernel/fork.c	2006-04-09 03:17:12.000000000 +0400
@@ -1157,18 +1157,6 @@ static task_t *copy_process(unsigned lon
 	}
 
 	if (clone_flags & CLONE_THREAD) {
-		/*
-		 * Important: if an exit-all has been started then
-		 * do not create this new thread - the whole thread
-		 * group is supposed to exit anyway.
-		 */
-		if (current->signal->flags & SIGNAL_GROUP_EXIT) {
-			spin_unlock(&current->sighand->siglock);
-			write_unlock_irq(&tasklist_lock);
-			retval = -EAGAIN;
-			goto bad_fork_cleanup_namespace;
-		}
-
 		p->group_leader = current->group_leader;
 		list_add_tail_rcu(&p->thread_group, &p->group_leader->thread_group);
 


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

* Re: [PATCH rc1-mm 3/3] coredump: copy_process: don't check SIGNAL_GROUP_EXIT
  2006-04-09  0:11 [PATCH rc1-mm 3/3] coredump: copy_process: don't check SIGNAL_GROUP_EXIT Oleg Nesterov
@ 2006-04-10  7:13 ` Roland McGrath
  0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2006-04-10  7:13 UTC (permalink / raw)
  To: Oleg Nesterov
  Cc: linux-kernel, Eric W. Biederman, Ingo Molnar, Paul E. McKenney,
	Andrew Morton, Lee Revell

> After the previous patch SIGNAL_GROUP_EXIT implies a pending SIGKILL,
> we can remove this check from copy_process() because we already checked
> !signal_pending().

My SIGNAL_GROUP_EXEC change made this spot check for either flag, but this
already holds true for the exec case and so my change to this check here
was not needed.  With the coredump change done, I concur that the exit
cases are covered too and so this check can go.  For paranoia's sake,
perhaps we should leave behind a BUG_ON.


Thanks,
Roland

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

end of thread, other threads:[~2006-04-10  7:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-09  0:11 [PATCH rc1-mm 3/3] coredump: copy_process: don't check SIGNAL_GROUP_EXIT Oleg Nesterov
2006-04-10  7:13 ` Roland McGrath

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