linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/6] de_thread: don't take tasklist_lock
@ 2006-02-22 23:05 Oleg Nesterov
  0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2006-02-22 23:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, Ingo Molnar, Paul E. McKenney, Eric W. Biederman,
	David Howells

de_thread() takes tasklist_lock for zap_other_threads(),
this is unneeded now.

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

--- 2.6.16-rc3/fs/exec.c~4_DET	2006-02-18 01:12:36.000000000 +0300
+++ 2.6.16-rc3/fs/exec.c	2006-02-23 01:59:12.000000000 +0300
@@ -604,7 +604,6 @@ static int de_thread(struct task_struct 
 	 * Kill all other threads in the thread group.
 	 * We must hold tasklist_lock to call zap_other_threads.
 	 */
-	read_lock(&tasklist_lock);
 	spin_lock_irq(lock);
 	if (sig->flags & SIGNAL_GROUP_EXIT) {
 		/*
@@ -612,12 +611,10 @@ static int de_thread(struct task_struct 
 		 * return so that the signal is processed.
 		 */
 		spin_unlock_irq(lock);
-		read_unlock(&tasklist_lock);
 		kmem_cache_free(sighand_cachep, newsighand);
 		return -EAGAIN;
 	}
 	zap_other_threads(current);
-	read_unlock(&tasklist_lock);
 
 	/*
 	 * Account for the thread group leader hanging around:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-22 23:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-22 23:05 [PATCH 4/6] de_thread: don't take tasklist_lock Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).