From: Oleg Nesterov ->siglock provides enough protection to iterate over the thread group. Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Signed-off-by: Andrew Morton --- kernel/exit.c | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) diff -puN kernel/exit.c~exit_notify-dont-take-tasklist-for-tif_sigpending-re-targeting kernel/exit.c --- a/kernel/exit.c~exit_notify-dont-take-tasklist-for-tif_sigpending-re-targeting +++ a/kernel/exit.c @@ -755,13 +755,11 @@ static void exit_notify(struct task_stru * Now we'll wake all the threads in the group just to make * sure someone gets all the pending signals. */ - read_lock(&tasklist_lock); spin_lock_irq(&tsk->sighand->siglock); for (t = next_thread(tsk); t != tsk; t = next_thread(t)) if (!signal_pending(t) && !(t->flags & PF_EXITING)) recalc_sigpending_and_wake(t); spin_unlock_irq(&tsk->sighand->siglock); - read_unlock(&tasklist_lock); } write_lock_irq(&tasklist_lock); @@ -789,9 +787,8 @@ static void exit_notify(struct task_stru * and we were the only connection outside, so our pgrp * is about to become orphaned. */ - t = tsk->real_parent; - + pgrp = task_pgrp(tsk); if ((task_pgrp(t) != pgrp) && (task_session(t) == task_session(tsk)) && _