]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: Don't use %pK through printk()
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Wed, 11 Jun 2025 09:58:06 +0000 (11:58 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 16 Jun 2025 18:34:21 +0000 (14:34 -0400)
commit76549adb4260e5966db533c73fbf5a4648038c1d
tree11174f828459453305084e55a39c4d9c6deeb82b
parentb1ba03c49a711c30e24735733dfd68f2422fa150
scsi: 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.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://lore.kernel.org/r/20250611-restricted-pointers-scsi-v1-1-fe31bfbc4910@linutronix.de
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
drivers/scsi/scsi_debug.c