Files
linux/fs
Oleg Nesterov d5bbd43d5f exec: make de_thread() killable
Change de_thread() to use KILLABLE rather than UNINTERRUPTIBLE while
waiting for other threads.  The only complication is that we should
clear ->group_exit_task and ->notify_count before we return, and we
should do this under tasklist_lock.  -EAGAIN is used to match the
initial signal_group_exit() check/return, it doesn't really matter.

This fixes the (unlikely) race with coredump.  de_thread() checks
signal_group_exit() before it starts to kill the subthreads, but this
can't help if another CLONE_VM (but non CLONE_THREAD) task starts the
coredumping after de_thread() unlocks ->siglock.  In this case the
killed sub-thread can block in exit_mm() waiting for coredump_finish(),
execing thread waits for that sub-thead, and the coredumping thread
waits for execing thread.  Deadlock.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-09 06:53:20 +09:00
..
2012-07-14 16:38:34 +04:00
2012-10-06 03:05:12 +09:00
2012-10-06 03:05:08 +09:00
2012-10-06 03:05:31 +09:00
2012-07-14 16:34:47 +04:00
2012-09-07 14:57:46 -04:00
2012-07-14 16:34:47 +04:00
2012-10-09 06:53:20 +09:00
2012-09-26 22:20:20 -04:00
2012-09-26 21:10:06 -04:00
2012-07-14 16:32:47 +04:00
2012-07-14 16:32:48 +04:00
2012-09-22 20:48:18 -04:00
2012-09-26 21:08:52 -04:00
2012-10-06 03:04:56 +09:00