diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h index cce104df51cb69dffb0a2d15cb92761cf0132872..de029656de13331c8912184cd0be3efc9233466f 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -38,10 +38,6 @@ # define _TIF_UPROBE (0) #endif -#ifndef _TIF_NOTIFY_SIGNAL -# define _TIF_NOTIFY_SIGNAL (0) -#endif - /* * TIF flags handled in syscall_enter_from_user_mode() */ diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h index 7a83bd4c82a9cb5957d65f26b4adf833dcac2def..174735dbad31bbd167b6a0a1b31c256b96bb0fc2 100644 --- a/include/linux/sched/signal.h +++ b/include/linux/sched/signal.h @@ -367,7 +367,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 @@ -375,7 +374,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); } diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 53f5065d7e800750beada7d6acdbda686622b500..8280243be3c8c01f5d0a34bff958df13ac5b0d69 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h @@ -209,12 +209,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 } /* @@ -222,11 +220,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 /* */ diff --git a/kernel/signal.c b/kernel/signal.c index c2afe6430e4de7eeedfb0db05eb44e8bebd3f82d..cf498d949f2f3ab1c101ec93567c93901765ac9d 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -2531,14 +2531,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;