]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
um: add support for TIF_NOTIFY_SIGNAL
authorJens Axboe <axboe@kernel.dk>
Fri, 9 Oct 2020 21:47:28 +0000 (15:47 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jan 2023 10:39:19 +0000 (11:39 +0100)
[ Upstream commit a5b3cd32ff238b87e94d47b927aff117e22d13c0 ]

Wire up TIF_NOTIFY_SIGNAL handling for um.

Cc: linux-um@lists.infradead.org
Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/um/include/asm/thread_info.h
arch/um/kernel/process.c

index 66ab6a07330b2de580a97d52d70082bce12328c9..e610e932cfe1e3fa4444b1bff8cf975ebdd7a300 100644 (file)
@@ -57,6 +57,7 @@ static inline struct thread_info *current_thread_info(void)
 #define TIF_SYSCALL_TRACE      0       /* syscall trace active */
 #define TIF_SIGPENDING         1       /* signal pending */
 #define TIF_NEED_RESCHED       2       /* rescheduling necessary */
+#define TIF_NOTIFY_SIGNAL      3       /* signal notifications exist */
 #define TIF_RESTART_BLOCK      4
 #define TIF_MEMDIE             5       /* is terminating due to OOM killer */
 #define TIF_SYSCALL_AUDIT      6
@@ -68,6 +69,7 @@ static inline struct thread_info *current_thread_info(void)
 #define _TIF_SYSCALL_TRACE     (1 << TIF_SYSCALL_TRACE)
 #define _TIF_SIGPENDING                (1 << TIF_SIGPENDING)
 #define _TIF_NEED_RESCHED      (1 << TIF_NEED_RESCHED)
+#define _TIF_NOTIFY_SIGNAL     (1 << TIF_NOTIFY_SIGNAL)
 #define _TIF_MEMDIE            (1 << TIF_MEMDIE)
 #define _TIF_SYSCALL_AUDIT     (1 << TIF_SYSCALL_AUDIT)
 #define _TIF_SECCOMP           (1 << TIF_SECCOMP)
index 8eb8b736abc1862aa3120c004acbf9e610a11942..067fb85fbf118813d5144e3d8ab4a00b467f5e81 100644 (file)
@@ -99,7 +99,8 @@ void interrupt_end(void)
 
        if (need_resched())
                schedule();
-       if (test_thread_flag(TIF_SIGPENDING))
+       if (test_thread_flag(TIF_SIGPENDING) ||
+           test_thread_flag(TIF_NOTIFY_SIGNAL))
                do_signal(regs);
        if (test_thread_flag(TIF_NOTIFY_RESUME))
                tracehook_notify_resume(regs);