Commit 3c532798 authored by Jens Axboe's avatar Jens Axboe
Browse files

tracehook: clear TIF_NOTIFY_RESUME in tracehook_notify_resume()



All the callers currently do this, clean it up and move the clearing
into tracehook_notify_resume() instead.

Reviewed-by: default avatarOleg Nesterov <oleg@redhat.com>
Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 324bcf54
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -531,7 +531,6 @@ do_work_pending(struct pt_regs *regs, unsigned long thread_flags,
				do_signal(regs, r0, r19);
				r0 = 0;
			} else {
				clear_thread_flag(TIF_NOTIFY_RESUME);
				tracehook_notify_resume(regs);
			}
		}
+1 −1
Original line number Diff line number Diff line
@@ -394,6 +394,6 @@ void do_notify_resume(struct pt_regs *regs)
	 * ASM glue gaurantees that this is only called when returning to
	 * user mode
	 */
	if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME))
	if (test_thread_flag(TIF_NOTIFY_RESUME))
		tracehook_notify_resume(regs);
}
+0 −1
Original line number Diff line number Diff line
@@ -669,7 +669,6 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall)
			} else if (thread_flags & _TIF_UPROBE) {
				uprobe_notify_resume(regs);
			} else {
				clear_thread_flag(TIF_NOTIFY_RESUME);
				tracehook_notify_resume(regs);
				rseq_handle_notify_resume(NULL, regs);
			}
+0 −1
Original line number Diff line number Diff line
@@ -946,7 +946,6 @@ asmlinkage void do_notify_resume(struct pt_regs *regs,
				do_signal(regs);

			if (thread_flags & _TIF_NOTIFY_RESUME) {
				clear_thread_flag(TIF_NOTIFY_RESUME);
				tracehook_notify_resume(regs);
				rseq_handle_notify_resume(NULL, regs);
			}
+1 −3
Original line number Diff line number Diff line
@@ -316,8 +316,6 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags,
	if (thread_info_flags & (1 << TIF_SIGPENDING))
		do_signal(regs, syscall);

	if (thread_info_flags & (1 << TIF_NOTIFY_RESUME)) {
		clear_thread_flag(TIF_NOTIFY_RESUME);
	if (thread_info_flags & (1 << TIF_NOTIFY_RESUME))
		tracehook_notify_resume(regs);
}
}
Loading