]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: loopback-test: Don't use %pK through printk
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Mon, 11 Aug 2025 12:10:21 +0000 (14:10 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 12 Aug 2025 11:06:13 +0000 (12:06 +0100)
commitb832b19318534bb4f1673b24d78037fee339c679
tree5b7d2142743cada0cc275ff49eb688b1bb5dfce6
parent528a813a5d98702cc6fd51983484cf7eec9ebcac
spi: loopback-test: Don't use %pK through printk

In the past %pK was preferable to %p as it would not leak raw pointer
values into the kernel log.
Since commit ad67b74d2469 ("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.
There are still a few users of %pK left, but these use it through seq_file,
for which its usage is safe.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20250811-restricted-pointers-spi-v1-1-32c47f954e4d@linutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-loopback-test.c