File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737# define _TIF_UPROBE (0)
3838#endif
3939
40- #ifndef _TIF_NOTIFY_SIGNAL
41- # define _TIF_NOTIFY_SIGNAL (0)
42- #endif
43-
4440/*
4541 * TIF flags handled in syscall_enter_from_user_mode()
4642 */
Original file line number Diff line number Diff line change @@ -360,15 +360,13 @@ static inline int task_sigpending(struct task_struct *p)
360360
361361static inline int signal_pending (struct task_struct * p )
362362{
363- #if defined(TIF_NOTIFY_SIGNAL )
364363 /*
365364 * TIF_NOTIFY_SIGNAL isn't really a signal, but it requires the same
366365 * behavior in terms of ensuring that we break out of wait loops
367366 * so that notify signal callbacks can be processed.
368367 */
369368 if (unlikely (test_tsk_thread_flag (p , TIF_NOTIFY_SIGNAL )))
370369 return 1 ;
371- #endif
372370 return task_sigpending (p );
373371}
374372
Original file line number Diff line number Diff line change @@ -205,24 +205,20 @@ static inline void tracehook_notify_resume(struct pt_regs *regs)
205205 */
206206static inline void tracehook_notify_signal (void )
207207{
208- #if defined(TIF_NOTIFY_SIGNAL )
209208 clear_thread_flag (TIF_NOTIFY_SIGNAL );
210209 smp_mb__after_atomic ();
211210 if (current -> task_works )
212211 task_work_run ();
213- #endif
214212}
215213
216214/*
217215 * Called when we have work to process from exit_to_user_mode_loop()
218216 */
219217static inline void set_notify_signal (struct task_struct * task )
220218{
221- #if defined(TIF_NOTIFY_SIGNAL )
222219 if (!test_and_set_tsk_thread_flag (task , TIF_NOTIFY_SIGNAL ) &&
223220 !wake_up_state (task , TASK_INTERRUPTIBLE ))
224221 kick_process (task );
225- #endif
226222}
227223
228224#endif /* <linux/tracehook.h> */
Original file line number Diff line number Diff line change @@ -2535,14 +2535,12 @@ bool get_signal(struct ksignal *ksig)
25352535 * that the arch handlers don't all have to do it. If we get here
25362536 * without TIF_SIGPENDING, just exit after running signal work.
25372537 */
2538- #ifdef TIF_NOTIFY_SIGNAL
25392538 if (!IS_ENABLED (CONFIG_GENERIC_ENTRY )) {
25402539 if (test_thread_flag (TIF_NOTIFY_SIGNAL ))
25412540 tracehook_notify_signal ();
25422541 if (!task_sigpending (current ))
25432542 return false;
25442543 }
2545- #endif
25462544
25472545 if (unlikely (uprobe_deny_signal ()))
25482546 return false;
You can’t perform that action at this time.
0 commit comments