Searched hist:"66 ae0d1e2d9fe6ec70e73fcfdcf4b390e271c1ac" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/kernel/ |
H A D | fork.c | diff 66ae0d1e2d9fe6ec70e73fcfdcf4b390e271c1ac Mon Mar 22 10:39:12 CDT 2021 Jens Axboe <axboe@kernel.dk> kernel: allow fork with TIF_NOTIFY_SIGNAL pending
fork() fails if signal_pending() is true, but there are two conditions that can lead to that:
1) An actual signal is pending. We want fork to fail for that one, like we always have.
2) TIF_NOTIFY_SIGNAL is pending, because the task has pending task_work. We don't need to make it fail for that case.
Allow fork() to proceed if just task_work is pending, by changing the signal_pending() check to task_sigpending().
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|