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

Wire up TIF_NOTIFY_SIGNAL handling for nios32.

Cc: Ley Foon Tan <ley.foon.tan@intel.com>
Acked-by: Ley Foon Tan <ley.foon.tan@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/nios2/include/asm/thread_info.h
arch/nios2/kernel/signal.c

index 7349a4fa635beafbaef4d0396f786908c00f5b75..272d2c72a7275bf1a0fe01789524e48cd00bf038 100644 (file)
@@ -86,6 +86,7 @@ static inline struct thread_info *current_thread_info(void)
 #define TIF_MEMDIE             4       /* is terminating due to OOM killer */
 #define TIF_SECCOMP            5       /* secure computing */
 #define TIF_SYSCALL_AUDIT      6       /* syscall auditing active */
+#define TIF_NOTIFY_SIGNAL      7       /* signal notifications exist */
 #define TIF_RESTORE_SIGMASK    9       /* restore signal mask in do_signal() */
 
 #define TIF_POLLING_NRFLAG     16      /* true if poll_idle() is polling
@@ -97,6 +98,7 @@ static inline struct thread_info *current_thread_info(void)
 #define _TIF_NEED_RESCHED      (1 << TIF_NEED_RESCHED)
 #define _TIF_SECCOMP           (1 << TIF_SECCOMP)
 #define _TIF_SYSCALL_AUDIT     (1 << TIF_SYSCALL_AUDIT)
+#define _TIF_NOTIFY_SIGNAL     (1 << TIF_NOTIFY_SIGNAL)
 #define _TIF_RESTORE_SIGMASK   (1 << TIF_RESTORE_SIGMASK)
 #define _TIF_POLLING_NRFLAG    (1 << TIF_POLLING_NRFLAG)
 
index 916180e4a9978190c3399a2eb62d87262c00fb26..68d626c4f1ba7708863ea71a6dc553a9f0480f6e 100644 (file)
@@ -309,7 +309,8 @@ asmlinkage int do_notify_resume(struct pt_regs *regs)
        if (!user_mode(regs))
                return 0;
 
-       if (test_thread_flag(TIF_SIGPENDING)) {
+       if (test_thread_flag(TIF_SIGPENDING) ||
+           test_thread_flag(TIF_NOTIFY_SIGNAL)) {
                int restart = do_signal(regs);
 
                if (unlikely(restart)) {