diff options
Diffstat (limited to 'kernel/trace/trace_output.c')
-rw-r--r-- | kernel/trace/trace_output.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index e37de492a9e1..51999309a6cf 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -1107,19 +1107,20 @@ static enum print_line_t trace_stack_print(struct trace_iterator *iter, | |||
1107 | { | 1107 | { |
1108 | struct stack_entry *field; | 1108 | struct stack_entry *field; |
1109 | struct trace_seq *s = &iter->seq; | 1109 | struct trace_seq *s = &iter->seq; |
1110 | int i; | 1110 | unsigned long *p; |
1111 | unsigned long *end; | ||
1111 | 1112 | ||
1112 | trace_assign_type(field, iter->ent); | 1113 | trace_assign_type(field, iter->ent); |
1114 | end = (unsigned long *)((long)iter->ent + iter->ent_size); | ||
1113 | 1115 | ||
1114 | if (!trace_seq_puts(s, "<stack trace>\n")) | 1116 | if (!trace_seq_puts(s, "<stack trace>\n")) |
1115 | goto partial; | 1117 | goto partial; |
1116 | for (i = 0; i < FTRACE_STACK_ENTRIES; i++) { | 1118 | |
1117 | if (!field->caller[i] || (field->caller[i] == ULONG_MAX)) | 1119 | for (p = field->caller; p && *p != ULONG_MAX && p < end; p++) { |
1118 | break; | ||
1119 | if (!trace_seq_puts(s, " => ")) | 1120 | if (!trace_seq_puts(s, " => ")) |
1120 | goto partial; | 1121 | goto partial; |
1121 | 1122 | ||
1122 | if (!seq_print_ip_sym(s, field->caller[i], flags)) | 1123 | if (!seq_print_ip_sym(s, *p, flags)) |
1123 | goto partial; | 1124 | goto partial; |
1124 | if (!trace_seq_puts(s, "\n")) | 1125 | if (!trace_seq_puts(s, "\n")) |
1125 | goto partial; | 1126 | goto partial; |