kernel: don't call do_exit() for PF_IO_WORKER threads
[ Upstream commit 10442994ba ]
Right now we're never calling get_signal() from PF_IO_WORKER threads, but
in preparation for doing so, don't handle a fatal signal for them. The
workers have state they need to cleanup when exiting, so just return
instead of calling do_exit() on their behalf. The threads themselves will
detect a fatal signal and do proper shutdown.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9ded44b69c
commit
831cb78a2a
+9
-1
@@ -2754,6 +2754,14 @@ relock:
|
|||||||
do_coredump(&ksig->info);
|
do_coredump(&ksig->info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PF_IO_WORKER threads will catch and exit on fatal signals
|
||||||
|
* themselves. They have cleanup that must be performed, so
|
||||||
|
* we cannot call do_exit() on their behalf.
|
||||||
|
*/
|
||||||
|
if (current->flags & PF_IO_WORKER)
|
||||||
|
goto out;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Death signals, no core dump.
|
* Death signals, no core dump.
|
||||||
*/
|
*/
|
||||||
@@ -2761,7 +2769,7 @@ relock:
|
|||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
spin_unlock_irq(&sighand->siglock);
|
spin_unlock_irq(&sighand->siglock);
|
||||||
|
out:
|
||||||
ksig->sig = signr;
|
ksig->sig = signr;
|
||||||
return ksig->sig > 0;
|
return ksig->sig > 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user