diff options
| author | 2025-06-11 11:58:06 +0200 | |
|---|---|---|
| committer | 2025-06-16 14:34:21 -0400 | |
| commit | 76549adb4260e5966db533c73fbf5a4648038c1d (patch) | |
| tree | 11174f828459453305084e55a39c4d9c6deeb82b /drivers/scsi/scsi_debug.c | |
| parent | scsi: core: Remember if a device is an ATA device (diff) | |
| download | wireguard-linux-76549adb4260e5966db533c73fbf5a4648038c1d.tar.xz wireguard-linux-76549adb4260e5966db533c73fbf5a4648038c1d.zip | |
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>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
| -rw-r--r-- | drivers/scsi/scsi_debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index aef33d1e346a..0847767d4d43 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -8770,7 +8770,7 @@ static int sdebug_add_store(void) dif_size = sdebug_store_sectors * sizeof(struct t10_pi_tuple); sip->dif_storep = vmalloc(dif_size); - pr_info("dif_storep %u bytes @ %pK\n", dif_size, + pr_info("dif_storep %u bytes @ %p\n", dif_size, sip->dif_storep); if (!sip->dif_storep) { |
