Skip to content

Commit 2362e81

Browse files
t-8chchenhuacai
authored andcommitted
LoongArch: Don't use %pK through printk() in unwinder
In the past %pK was preferable to %p as it would not leak raw pointer values into the kernel log. Since commit ad67b74 ("printk: hash addresses printed with %p") the regular %p has been improved to avoid this issue. Furthermore, restricted pointers ("%pK") were never meant to be used through printk(). They can still unintentionally leak raw pointers or acquire sleeping locks in atomic contexts. Switch to the regular pointer formatting which is safer and easier to reason about. Cc: stable@vger.kernel.org Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent 70a2365 commit 2362e81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/loongarch/kernel/unwind_orc.c

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

509509
state->pc = bt_address(pc);
510510
if (!state->pc) {
511-
pr_err("cannot find unwind pc at %pK\n", (void *)pc);
511+
pr_err("cannot find unwind pc at %p\n", (void *)pc);
512512
goto err;
513513
}
514514

0 commit comments

Comments
 (0)