path: root/fs/binfmt_elf.c
diff options
authorRoland McGrath <>2008-07-25 19:45:44 -0700
committerLinus Torvalds <>2008-07-26 12:00:08 -0700
commit6341c393fcc37d58727865f1ee2f65e632e9d4f0 (patch)
tree6e88d928e17f663b225884e81877a7a069d7c514 /fs/binfmt_elf.c
parent88ac2921a71f788ed693bcd44731dd6bc1994640 (diff)
tracehook: exec
This moves all the ptrace hooks related to exec into tracehook.h inlines. This also lifts the calls for tracing out of the binfmt load_binary hooks into search_binary_handler() after it calls into the binfmt module. This change has no effect, since all the binfmt modules' load_binary functions did the call at the end on success, and now search_binary_handler() does it immediately after return if successful. We consolidate the repeated code, and binfmt modules no longer need to import ptrace_notify(). Signed-off-by: Roland McGrath <> Cc: Oleg Nesterov <> Reviewed-by: Ingo Molnar <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'fs/binfmt_elf.c')
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 3b6ff854d98..655ed8d30a8 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1003,12 +1003,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
start_thread(regs, elf_entry, bprm->p);
- if (unlikely(current->ptrace & PT_PTRACED)) {
- if (current->ptrace & PT_TRACE_EXEC)
- ptrace_notify ((PTRACE_EVENT_EXEC << 8) | SIGTRAP);
- else
- send_sig(SIGTRAP, current, 0);
- }
retval = 0;