* [PATCH] fix de_thread vs it_real_fn() deadlock
@ 2005-09-24 13:46 Oleg Nesterov
0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2005-09-24 13:46 UTC (permalink / raw)
To: linux-kernel; +Cc: Roland McGrath, Ingo Molnar, Andrew Morton
de_thread() calls del_timer_sync(->real_timer) under
->sighand->siglock. This is deadlockable, it_real_fn
sends a signal and needs this lock too.
Also, delete unneeded ->real_timer.data assignment.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- 2.6.14-rc2/fs/exec.c~3_DEIT 2005-09-21 21:08:33.000000000 +0400
+++ 2.6.14-rc2/fs/exec.c 2005-09-24 20:31:25.000000000 +0400
@@ -646,8 +646,10 @@ static inline int de_thread(struct task_
* before we can safely let the old group leader die.
*/
sig->real_timer.data = (unsigned long)current;
+ spin_unlock_irq(lock);
if (del_timer_sync(&sig->real_timer))
add_timer(&sig->real_timer);
+ spin_lock_irq(lock);
}
while (atomic_read(&sig->count) > count) {
sig->group_exit_task = current;
@@ -659,7 +661,6 @@ static inline int de_thread(struct task_
}
sig->group_exit_task = NULL;
sig->notify_count = 0;
- sig->real_timer.data = (unsigned long)current;
spin_unlock_irq(lock);
/*
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-24 13:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-24 13:46 [PATCH] fix de_thread vs it_real_fn() deadlock 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).