You need to sign in or sign up before continuing.
提交 4937a88b 编写于 作者: J Jens Axboe 提交者: Jialin Zhang

kernel: remove checking for TIF_NOTIFY_SIGNAL

stable inclusion
from stable-v5.10.162
commit 90a2c3821bbfe8435bde901953871576a1bf8c6d
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I6BTWC
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.168&id=90a2c3821bbfe8435bde901953871576a1bf8c6d

--------------------------------

[ Upstream commit e296dc49 ]

It's available everywhere now, no need to check or add dummy defines.
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NLi Lingfeng <lilingfeng3@huawei.com>
Reviewed-by: NZhang Yi <yi.zhang@huawei.com>
Reviewed-by: NWang Weiyang <wangweiyang2@huawei.com>
Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
上级 208dab53
...@@ -38,10 +38,6 @@ ...@@ -38,10 +38,6 @@
# define _TIF_UPROBE (0) # define _TIF_UPROBE (0)
#endif #endif
#ifndef _TIF_NOTIFY_SIGNAL
# define _TIF_NOTIFY_SIGNAL (0)
#endif
/* /*
* TIF flags handled in syscall_enter_from_user_mode() * TIF flags handled in syscall_enter_from_user_mode()
*/ */
......
...@@ -367,7 +367,6 @@ static inline int task_sigpending(struct task_struct *p) ...@@ -367,7 +367,6 @@ static inline int task_sigpending(struct task_struct *p)
static inline int signal_pending(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 * 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 * 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) ...@@ -375,7 +374,6 @@ static inline int signal_pending(struct task_struct *p)
*/ */
if (unlikely(test_tsk_thread_flag(p, TIF_NOTIFY_SIGNAL))) if (unlikely(test_tsk_thread_flag(p, TIF_NOTIFY_SIGNAL)))
return 1; return 1;
#endif
return task_sigpending(p); return task_sigpending(p);
} }
......
...@@ -209,12 +209,10 @@ static inline void tracehook_notify_resume(struct pt_regs *regs) ...@@ -209,12 +209,10 @@ static inline void tracehook_notify_resume(struct pt_regs *regs)
*/ */
static inline void tracehook_notify_signal(void) static inline void tracehook_notify_signal(void)
{ {
#if defined(TIF_NOTIFY_SIGNAL)
clear_thread_flag(TIF_NOTIFY_SIGNAL); clear_thread_flag(TIF_NOTIFY_SIGNAL);
smp_mb__after_atomic(); smp_mb__after_atomic();
if (current->task_works) if (current->task_works)
task_work_run(); task_work_run();
#endif
} }
/* /*
...@@ -222,11 +220,9 @@ static inline void tracehook_notify_signal(void) ...@@ -222,11 +220,9 @@ static inline void tracehook_notify_signal(void)
*/ */
static inline void set_notify_signal(struct task_struct *task) 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) && if (!test_and_set_tsk_thread_flag(task, TIF_NOTIFY_SIGNAL) &&
!wake_up_state(task, TASK_INTERRUPTIBLE)) !wake_up_state(task, TASK_INTERRUPTIBLE))
kick_process(task); kick_process(task);
#endif
} }
#endif /* <linux/tracehook.h> */ #endif /* <linux/tracehook.h> */
...@@ -2531,14 +2531,12 @@ bool get_signal(struct ksignal *ksig) ...@@ -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 * that the arch handlers don't all have to do it. If we get here
* without TIF_SIGPENDING, just exit after running signal work. * without TIF_SIGPENDING, just exit after running signal work.
*/ */
#ifdef TIF_NOTIFY_SIGNAL
if (!IS_ENABLED(CONFIG_GENERIC_ENTRY)) { if (!IS_ENABLED(CONFIG_GENERIC_ENTRY)) {
if (test_thread_flag(TIF_NOTIFY_SIGNAL)) if (test_thread_flag(TIF_NOTIFY_SIGNAL))
tracehook_notify_signal(); tracehook_notify_signal();
if (!task_sigpending(current)) if (!task_sigpending(current))
return false; return false;
} }
#endif
if (unlikely(uprobe_deny_signal())) if (unlikely(uprobe_deny_signal()))
return false; return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册