Skip to content

Commit 77403a0

Browse files
seehearfeelchenhuacai
authored andcommitted
LoongArch: Use %px to print unmodified unwinding address
Currently, use %p to prevent leaking information about the kernel memory layout when printing the PC address, but the kernel log messages are not useful to debug problem if bt_address() returns 0. Given that the type of "pc" variable is unsigned long, it should use %px to print the unmodified unwinding address. Cc: stable@vger.kernel.org Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent 2172d6e commit 77403a0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/loongarch/kernel/unwind_orc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ bool unwind_next_frame(struct unwind_state *state)
494494

495495
state->pc = bt_address(pc);
496496
if (!state->pc) {
497-
pr_err("cannot find unwind pc at %p\n", (void *)pc);
497+
pr_err("cannot find unwind pc at %px\n", (void *)pc);
498498
goto err;
499499
}
500500

0 commit comments

Comments
 (0)