Skip to contentSkip to conversation

do_group_exit: don't take tasklist_lock

PATCH In review Oleg Nesterov 1 participant 1 message Feb 22, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 5/6 do_group_exit: don't take tasklist_lock

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

kernel/exit.c renamed from kernel/exit.c~5_DGE +0 -2
@@ -971,7 +971,6 @@ do_group_exit(int exit_code)
 	else if (!thread_group_empty(current)) {
 		struct signal_struct *const sig = current->signal;
 		struct sighand_struct *const sighand = current->sighand;
-		read_lock(&tasklist_lock);
 		spin_lock_irq(&sighand->siglock);
 		if (sig->flags & SIGNAL_GROUP_EXIT)
 			/* Another thread got here before we took the lock.  */
@@ -981,7 +980,6 @@ do_group_exit(int exit_code)
 			zap_other_threads(current);
 		}
 		spin_unlock_irq(&sighand->siglock);
-		read_unlock(&tasklist_lock);
 	}
 
 	do_exit(exit_code);