From f3c04b934d429b1ace21866f011b66de328c0dc9 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Fri, 17 Jun 2011 16:50:36 +0200 Subject: ptrace: move SIGTRAP on exec(2) logic to ptrace_event() Move SIGTRAP on exec(2) logic from tracehook_report_exec() to ptrace_event(). This is part of changes to make ptrace_event() smarter and handle ptrace event related details in one place. This doesn't introduce any behavior change. Signed-off-by: Tejun Heo Signed-off-by: Oleg Nesterov --- include/linux/tracehook.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'include/linux/tracehook.h') diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 7d38571b0c05..3b68aa842a92 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h @@ -201,9 +201,7 @@ static inline void tracehook_report_exec(struct linux_binfmt *fmt, struct linux_binprm *bprm, struct pt_regs *regs) { - if (!ptrace_event(PTRACE_EVENT_EXEC, 0) && - unlikely(current->ptrace & PT_PTRACED)) - send_sig(SIGTRAP, current, 0); + ptrace_event(PTRACE_EVENT_EXEC, 0); } /** -- cgit v1.2.3