kernel: remove checking for TIF_NOTIFY_SIGNAL
authorJens Axboe <axboe@kernel.dk>
Fri, 9 Oct 2020 22:04:39 +0000 (16:04 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 12 Dec 2020 16:17:38 +0000 (09:17 -0700)
It's available everywhere now, no need to check or add dummy defines.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/entry-common.h
include/linux/sched/signal.h
include/linux/tracehook.h
kernel/signal.c

index b9711e8..abec3a5 100644 (file)
 # define _TIF_UPROBE                   (0)
 #endif
 
-#ifndef _TIF_NOTIFY_SIGNAL
-# define _TIF_NOTIFY_SIGNAL            (0)
-#endif
-
 /*
  * TIF flags handled in syscall_enter_from_user_mode()
  */
index bd5afa0..24b7b86 100644 (file)
@@ -360,7 +360,6 @@ static inline int task_sigpending(struct task_struct *p)
 
 static inline int signal_pending(struct task_struct *p)
 {
-#if defined(TIF_NOTIFY_SIGNAL)
        /*
         * TIF_NOTIFY_SIGNAL isn't really a signal, but it requires the same
         * behavior in terms of ensuring that we break out of wait loops
@@ -368,7 +367,6 @@ static inline int signal_pending(struct task_struct *p)
         */
        if (unlikely(test_tsk_thread_flag(p, TIF_NOTIFY_SIGNAL)))
                return 1;
-#endif
        return task_sigpending(p);
 }
 
index f7d82e4..ee9ab7d 100644 (file)
@@ -205,12 +205,10 @@ static inline void tracehook_notify_resume(struct pt_regs *regs)
  */
 static inline void tracehook_notify_signal(void)
 {
-#if defined(TIF_NOTIFY_SIGNAL)
        clear_thread_flag(TIF_NOTIFY_SIGNAL);
        smp_mb__after_atomic();
        if (current->task_works)
                task_work_run();
-#endif
 }
 
 /*
@@ -218,11 +216,9 @@ static inline void tracehook_notify_signal(void)
  */
 static inline void set_notify_signal(struct task_struct *task)
 {
-#if defined(TIF_NOTIFY_SIGNAL)
        if (!test_and_set_tsk_thread_flag(task, TIF_NOTIFY_SIGNAL) &&
            !wake_up_state(task, TASK_INTERRUPTIBLE))
                kick_process(task);
-#endif
 }
 
 #endif /* <linux/tracehook.h> */
index cf8b057..ccd5305 100644 (file)
@@ -2535,14 +2535,12 @@ bool get_signal(struct ksignal *ksig)
         * that the arch handlers don't all have to do it. If we get here
         * without TIF_SIGPENDING, just exit after running signal work.
         */
-#ifdef TIF_NOTIFY_SIGNAL
        if (!IS_ENABLED(CONFIG_GENERIC_ENTRY)) {
                if (test_thread_flag(TIF_NOTIFY_SIGNAL))
                        tracehook_notify_signal();
                if (!task_sigpending(current))
                        return false;
        }
-#endif
 
        if (unlikely(uprobe_deny_signal()))
                return false;