diff options
author | Tejun Heo <tj@kernel.org> | 2011-06-17 10:50:36 -0400 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2011-06-22 13:26:28 -0400 |
commit | f3c04b934d429b1ace21866f011b66de328c0dc9 (patch) | |
tree | 16ac465b4f5294f71995554ca1e94913fdeda234 /include/linux/tracehook.h | |
parent | 643ad8388e189dfd14ef76972cf7dc394b3cbebd (diff) |
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 <tj@kernel.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'include/linux/tracehook.h')
-rw-r--r-- | include/linux/tracehook.h | 4 |
1 files changed, 1 insertions, 3 deletions
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, | |||
201 | struct linux_binprm *bprm, | 201 | struct linux_binprm *bprm, |
202 | struct pt_regs *regs) | 202 | struct pt_regs *regs) |
203 | { | 203 | { |
204 | if (!ptrace_event(PTRACE_EVENT_EXEC, 0) && | 204 | ptrace_event(PTRACE_EVENT_EXEC, 0); |
205 | unlikely(current->ptrace & PT_PTRACED)) | ||
206 | send_sig(SIGTRAP, current, 0); | ||
207 | } | 205 | } |
208 | 206 | ||
209 | /** | 207 | /** |