aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2008-07-25 22:45:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-26 15:00:08 -0400
commit30199f5a46aee204bf437a4f5b0740f3efe448b7 (patch)
tree9855ecf45727f6c41e9d75d4a5ac68c35546c14d /kernel/exit.c
parentff1188646c6870f336e910fb894eeed74f50471f (diff)
tracehook: exit
This moves the PTRACE_EVENT_EXIT tracing into a tracehook.h inline, tracehook_report_exec(). The change has no effect, just clean-up. Signed-off-by: Roland McGrath <roland@redhat.com> Cc: Oleg Nesterov <oleg@tv-sign.ru> Reviewed-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index ad933bb29ec7..c3691cbc220a 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -46,6 +46,7 @@
46#include <linux/resource.h> 46#include <linux/resource.h>
47#include <linux/blkdev.h> 47#include <linux/blkdev.h>
48#include <linux/task_io_accounting_ops.h> 48#include <linux/task_io_accounting_ops.h>
49#include <linux/tracehook.h>
49 50
50#include <asm/uaccess.h> 51#include <asm/uaccess.h>
51#include <asm/unistd.h> 52#include <asm/unistd.h>
@@ -1029,10 +1030,7 @@ NORET_TYPE void do_exit(long code)
1029 if (unlikely(!tsk->pid)) 1030 if (unlikely(!tsk->pid))
1030 panic("Attempted to kill the idle task!"); 1031 panic("Attempted to kill the idle task!");
1031 1032
1032 if (unlikely(current->ptrace & PT_TRACE_EXIT)) { 1033 tracehook_report_exit(&code);
1033 current->ptrace_message = code;
1034 ptrace_notify((PTRACE_EVENT_EXIT << 8) | SIGTRAP);
1035 }
1036 1034
1037 /* 1035 /*
1038 * We're taking recursive faults here in do_exit. Safest is to just 1036 * We're taking recursive faults here in do_exit. Safest is to just