Skip to content

Commit 4e4f74a

Browse files
committed
Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull lockdep fix from Ingo Molnar: "This fixes an ugly lockdep stack trace output regression. (But also affects other stacktrace users such as kmemleak, KASAN, etc)" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: stacktrace, lockdep: Fix address, newline ugliness
2 parents 21a7061 + bfeda41 commit 4e4f74a

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

kernel/stacktrace.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,24 @@ void print_stack_trace(struct stack_trace *trace, int spaces)
1818
if (WARN_ON(!trace->entries))
1919
return;
2020

21-
for (i = 0; i < trace->nr_entries; i++) {
22-
printk("%*c", 1 + spaces, ' ');
23-
print_ip_sym(trace->entries[i]);
24-
}
21+
for (i = 0; i < trace->nr_entries; i++)
22+
printk("%*c%pS\n", 1 + spaces, ' ', (void *)trace->entries[i]);
2523
}
2624
EXPORT_SYMBOL_GPL(print_stack_trace);
2725

2826
int snprint_stack_trace(char *buf, size_t size,
2927
struct stack_trace *trace, int spaces)
3028
{
3129
int i;
32-
unsigned long ip;
3330
int generated;
3431
int total = 0;
3532

3633
if (WARN_ON(!trace->entries))
3734
return 0;
3835

3936
for (i = 0; i < trace->nr_entries; i++) {
40-
ip = trace->entries[i];
41-
generated = snprintf(buf, size, "%*c[<%p>] %pS\n",
42-
1 + spaces, ' ', (void *) ip, (void *) ip);
37+
generated = snprintf(buf, size, "%*c%pS\n", 1 + spaces, ' ',
38+
(void *)trace->entries[i]);
4339

4440
total += generated;
4541

0 commit comments

Comments
 (0)