Commit bbcf9c43 authored by Jens Axboe's avatar Jens Axboe Committed by sanglipeng
Browse files

task_work: unconditionally run task_work from get_signal()

stable inclusion
from stable-v5.10.162
commit 6ef2b4728a00c98cc1163212443e39d79a4c2c94
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7P7OH

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6ef2b4728a00c98cc1163212443e39d79a4c2c94



--------------------------------

[ Upstream commit 35d0b389 ]

Song reported a boot regression in a kvm image with 5.11-rc, and bisected
it down to the below patch. Debugging this issue, turns out that the boot
stalled when a task is waiting on a pipe being released. As we no longer
run task_work from get_signal() unless it's queued with TWA_SIGNAL, the
task goes idle without running the task_work. This prevents ->release()
from being called on the pipe, which another boot task is waiting on.

For now, re-instate the unconditional task_work run from get_signal().
For 5.12, we'll collapse TWA_RESUME and TWA_SIGNAL, as it no longer
makes sense to have a distinction between the two. This will turn
task_work notification into a simple boolean, whether to notify or not.

Fixes: 98b89b64 ("signal: kill JOBCTL_TASK_WORK")
Reported-by: default avatarSong Liu <songliubraving@fb.com>
Tested-by: default avatarJohn Stultz <john.stultz@linaro.org>
Tested-by: default avatarDouglas Anderson <dianders@chromium.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM/Clang version 11.0.1
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 5e97c009
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment