diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-08-04 07:58:28 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-08-04 07:58:28 -0400 |
| commit | e16852cfc5580b88cb327413ab8c89375f380592 (patch) | |
| tree | 67e7d5b84e2602986f2da689625e5a25d7af7bb4 /kernel/trace/trace_functions_graph.c | |
| parent | bdff78707f3ce47e891f3201c9666122a70556ce (diff) | |
| parent | 74e7ff8c50b6b022e6ffaa736b16a4dc161d3eaf (diff) | |
Merge branch 'tracing/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into tracing/urgent
Diffstat (limited to 'kernel/trace/trace_functions_graph.c')
| -rw-r--r-- | kernel/trace/trace_functions_graph.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index d2249abafb53..420ec3487579 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c | |||
| @@ -843,9 +843,16 @@ print_graph_function(struct trace_iterator *iter) | |||
| 843 | 843 | ||
| 844 | switch (entry->type) { | 844 | switch (entry->type) { |
| 845 | case TRACE_GRAPH_ENT: { | 845 | case TRACE_GRAPH_ENT: { |
| 846 | struct ftrace_graph_ent_entry *field; | 846 | /* |
| 847 | * print_graph_entry() may consume the current event, | ||
| 848 | * thus @field may become invalid, so we need to save it. | ||
| 849 | * sizeof(struct ftrace_graph_ent_entry) is very small, | ||
| 850 | * it can be safely saved at the stack. | ||
| 851 | */ | ||
| 852 | struct ftrace_graph_ent_entry *field, saved; | ||
| 847 | trace_assign_type(field, entry); | 853 | trace_assign_type(field, entry); |
| 848 | return print_graph_entry(field, s, iter); | 854 | saved = *field; |
| 855 | return print_graph_entry(&saved, s, iter); | ||
| 849 | } | 856 | } |
| 850 | case TRACE_GRAPH_RET: { | 857 | case TRACE_GRAPH_RET: { |
| 851 | struct ftrace_graph_ret_entry *field; | 858 | struct ftrace_graph_ret_entry *field; |
