2006-02-22 23:08:37

by Oleg Nesterov

[permalink] [raw]
Subject: [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.

Signed-off-by: Oleg Nesterov <[email protected]>

--- 2.6.16-rc3/kernel/exit.c~5_DGE 2006-02-23 01:00:35.000000000 +0300
+++ 2.6.16-rc3/kernel/exit.c 2006-02-23 02:01:03.000000000 +0300
@@ -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);