diff options
author | Oleg Nesterov <oleg@redhat.com> | 2012-03-30 12:26:36 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-03-31 05:53:22 -0400 |
commit | 6308191f6f55d3629c7dbe72dfb856ad9fa560fd (patch) | |
tree | d3f073b0e522fc7dbee52ca6c25d92f28059f2fd /include | |
parent | 8ebfdf2babcda5a3b06cc67523bca1f9aed46009 (diff) |
tracing, sched, vfs: Fix 'old_pid' usage in trace_sched_process_exec()
1. TRACE_EVENT(sched_process_exec) forgets to actually use the
old pid argument, it sets ->old_pid = p->pid.
2. search_binary_handler() uses the wrong pid number. tracepoint
needs the global pid_t from the root namespace, while old_pid
is the virtual pid number as it seen by the tracer/parent.
With this patch we have two pid_t's in search_binary_handler(),
not really nice. Perhaps we should switch to "struct pid*", but
in this case it would be better to cleanup the current code
first and move the "depth == 0" code outside.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: David Smith <dsmith@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Link: http://lkml.kernel.org/r/20120330162636.GA4857@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/trace/events/sched.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index fbc7b1ad929b..ea7a2035456d 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -295,7 +295,7 @@ TRACE_EVENT(sched_process_exec, | |||
295 | TP_fast_assign( | 295 | TP_fast_assign( |
296 | __assign_str(filename, bprm->filename); | 296 | __assign_str(filename, bprm->filename); |
297 | __entry->pid = p->pid; | 297 | __entry->pid = p->pid; |
298 | __entry->old_pid = p->pid; | 298 | __entry->old_pid = old_pid; |
299 | ), | 299 | ), |
300 | 300 | ||
301 | TP_printk("filename=%s pid=%d old_pid=%d", __get_str(filename), | 301 | TP_printk("filename=%s pid=%d old_pid=%d", __get_str(filename), |