]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
UBUNTU: SAUCE: kthread: Do not leave kthread_create() immediately upon SIGKILL.
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Sat, 29 Mar 2014 06:39:24 +0000 (15:39 +0900)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 29 Jan 2018 13:44:51 +0000 (07:44 -0600)
commita0987ba0cc71cdc7bf99775b306652c315123e22
tree335f0438b529601a21e1ea1dba2909ec3f9297f6
parentd8a077b6271ef3d7620f0e95d4a343ec1661fe5d
UBUNTU: SAUCE: kthread: Do not leave kthread_create() immediately upon SIGKILL.

Commit 786235ee "kthread: make kthread_create() killable" changed to
leave kthread_create() as soon as receiving SIGKILL. But this change
caused boot failures if systemd-udevd worker process received SIGKILL
due to systemd's hardcoded 30 seconds timeout while loading fusion
driver using finit_module() [1].

Linux kernel people think that the systemd's hardcoded timeout is a
systemd bug. But systemd people think that loading of kernel module
needs more than 30 seconds is a kernel module's bug.

Although Linux kernel people are expecting fusion driver module not
to take more than 30 seconds, it will definitely not in time for
trusty kernel. Also, nobody can prove that fusion driver module is
the only case which is affected by commit 786235ee.

Therefore, this patch changes kthread_create() to wait for up to 10
seconds after receiving SIGKILL, unless chosen by the OOM killer,
in order to give the kthreadd a chance to complete the request.
The side effect of this patch is that current thread's response to
SIGKILL is delayed for a bit (likely less than a second, unlikely
10 seconds).

  [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1276705

Reported-by: Pierre Fersing <pierref@pierref.org>
Reported-by: Faidon Liambotis <paravoid@debian.org>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
kernel/kthread.c