]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
kernel: remove checking for TIF_NOTIFY_SIGNAL
authorJens Axboe <axboe@kernel.dk>
Fri, 9 Oct 2020 22:04:39 +0000 (16:04 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jan 2023 10:39:22 +0000 (11:39 +0100)
[ Upstream commit e296dc4996b8094ccde45d19090d804c4103513e ]

It's available everywhere now, no need to check or add dummy defines.

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

index 1a128baf3628875789b736974cd93d9c689e8b47..46c42479f950121a8b56ae49c819a03ce435f70b 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 a5373a13ba2caebb910591c3cc48a264bc4e55ac..ae60f838ebb92afd7f77503c7a7af11b66dd2173 100644 (file)
@@ -361,7 +361,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
@@ -369,7 +368,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 f7d82e4fafd6c78fd6a628e6a77068140c0faf94..ee9ab7dbc8c3508606da402f10338e1df31cd528 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 269382a931198fa3e5eaa4bac495fbf5312bcd8a..845d4912b83aa5c326d3d113d9abb7fd2e5c09b8 100644 (file)
@@ -2525,14 +2525,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;