Skip to content

Commit 0632a6d

Browse files
geertuRich Felker
authored andcommitted
sh: dump_stack: Fix broken lines and ptrval in calltrace dumps
Rejoin the broken lines by dropping the log level parameters and using pr_cont(). Use "%px" to print sensible addresses in call traces. Signed-off-by: Geert Uytterhoeven <[email protected]> Tested-by: Guenter Roeck <[email protected]> Signed-off-by: Rich Felker <[email protected]>
1 parent 9b9fae8 commit 0632a6d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

arch/sh/kernel/dumpstack.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
#include <asm/unwinder.h>
1717
#include <asm/stacktrace.h>
1818

19-
void dump_mem(const char *str, const char *loglvl,
20-
unsigned long bottom, unsigned long top)
19+
void dump_mem(const char *str, const char *loglvl, unsigned long bottom,
20+
unsigned long top)
2121
{
2222
unsigned long p;
2323
int i;
@@ -31,23 +31,23 @@ void dump_mem(const char *str, const char *loglvl,
3131
unsigned int val;
3232

3333
if (p < bottom || p >= top)
34-
printk("%s ", loglvl);
34+
pr_cont(" ");
3535
else {
3636
if (__get_user(val, (unsigned int __user *)p)) {
37-
printk("%s\n", loglvl);
37+
pr_cont("\n");
3838
return;
3939
}
40-
printk("%s%08x ", loglvl, val);
40+
pr_cont("%08x ", val);
4141
}
4242
}
43-
printk("%s\n", loglvl);
43+
pr_cont("\n");
4444
}
4545
}
4646

4747
void printk_address(unsigned long address, int reliable)
4848
{
49-
printk(" [<%p>] %s%pS\n", (void *) address,
50-
reliable ? "" : "? ", (void *) address);
49+
pr_cont(" [<%px>] %s%pS\n", (void *) address,
50+
reliable ? "" : "? ", (void *) address);
5151
}
5252

5353
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
@@ -137,7 +137,7 @@ void show_trace(struct task_struct *tsk, unsigned long *sp,
137137

138138
unwind_stack(tsk, regs, sp, &print_trace_ops, (void *)loglvl);
139139

140-
printk("%s\n", loglvl);
140+
pr_cont("\n");
141141

142142
if (!tsk)
143143
tsk = current;

0 commit comments

Comments
 (0)