]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
signal: Add task_sigpending() helper
authorJens Axboe <axboe@kernel.dk>
Mon, 26 Oct 2020 20:32:27 +0000 (14:32 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jan 2023 10:39:17 +0000 (11:39 +0100)
commit52cfde6bbf64f7f058efa805c6dbb6332d4de6fa
treeedf7dfacbbcd8f96d3bd0fadda453cb1312a0c0c
parentad0b0137953a2c973958dadf6d222e120e278856
signal: Add task_sigpending() helper

[ Upstream commit 5c251e9dc0e127bac6fc5b8e6696363d2e35f515 ]

This is in preparation for maintaining signal_pending() as the decider of
whether or not a schedule() loop should be broken, or continue sleeping.
This is different than the core signal use cases, which really need to know
whether an actual signal is pending or not. task_sigpending() returns
non-zero if TIF_SIGPENDING is set.

Only core kernel use cases should care about the distinction between
the two, make sure those use the task_sigpending() helper.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20201026203230.386348-2-axboe@kernel.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/sched/signal.h
kernel/events/uprobes.c
kernel/signal.c