Skip to content

Commit 6d54ceb

Browse files
Etsukatarostedt
authored andcommitted
tracing: Fix user stack trace "??" output
Commit c5c27a0 ("x86/stacktrace: Remove the pointless ULONG_MAX marker") removes ULONG_MAX marker from user stack trace entries but trace_user_stack_print() still uses the marker and it outputs unnecessary "??". For example: less-1911 [001] d..2 34.758944: <user stack trace> => <00007f16f2295910> => ?? => ?? => ?? => ?? => ?? => ?? => ?? The user stack trace code zeroes the storage before saving the stack, so if the trace is shorter than the maximum number of entries it can terminate the print loop if a zero entry is detected. Link: http://lkml.kernel.org/r/[email protected] Cc: [email protected] Fixes: 4285f2f ("tracing: Remove the ULONG_MAX stack trace hackery") Signed-off-by: Eiichi Tsukata <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 0aeb1de commit 6d54ceb

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

kernel/trace/trace_output.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,17 +1109,10 @@ static enum print_line_t trace_user_stack_print(struct trace_iterator *iter,
11091109
for (i = 0; i < FTRACE_STACK_ENTRIES; i++) {
11101110
unsigned long ip = field->caller[i];
11111111

1112-
if (ip == ULONG_MAX || trace_seq_has_overflowed(s))
1112+
if (!ip || trace_seq_has_overflowed(s))
11131113
break;
11141114

11151115
trace_seq_puts(s, " => ");
1116-
1117-
if (!ip) {
1118-
trace_seq_puts(s, "??");
1119-
trace_seq_putc(s, '\n');
1120-
continue;
1121-
}
1122-
11231116
seq_print_user_ip(s, mm, ip, flags);
11241117
trace_seq_putc(s, '\n');
11251118
}

0 commit comments

Comments
 (0)