[PATCH 5/5] RISC-V: stacktrace: output stack traces to standard error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



KASAN splats are currently split between standard output and standard
error, which looks ok, when both are enabled on the same consoles, but
is difficult to follow when mapping standard out/err to different
consoles. Let's move all stack trace dumping to standard error. This is
already the case for ARM.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 arch/riscv/lib/stacktrace.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/riscv/lib/stacktrace.c b/arch/riscv/lib/stacktrace.c
index 663938019ee6..b678ad7d5241 100644
--- a/arch/riscv/lib/stacktrace.c
+++ b/arch/riscv/lib/stacktrace.c
@@ -22,9 +22,9 @@ struct stackframe {
 static void dump_backtrace_entry(unsigned long where, unsigned long from)
 {
 #ifdef CONFIG_KALLSYMS
-	printf("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from);
+	eprintf("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from);
 #else
-	printf("Function entered at [<%08lx>] from [<%08lx>]\n", where, from);
+	eprintf("Function entered at [<%08lx>] from [<%08lx>]\n", where, from);
 #endif
 }
 
@@ -60,7 +60,7 @@ void unwind_backtrace(const struct pt_regs *regs)
 		frame.ra = (unsigned long)unwind_backtrace;
 	}
 
-	printf("Call trace:\n");
+	eprintf("Call trace:\n");
 	for (;;) {
 		unsigned long where = frame.ra;
 		int ret;
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux