* [PATCH] drivers/scsi: Fix kernel pointer leak
@ 2021-09-29 12:25 Guo Zhi
2021-10-12 20:35 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Guo Zhi @ 2021-09-29 12:25 UTC (permalink / raw)
To: Matthew Wilcox, Hannes Reinecke, James E.J. Bottomley,
Martin K. Petersen
Cc: Guo Zhi, linux-scsi, linux-kernel
Pointers should be printed with %p or %px rather than cast to
'unsigned long' and pinted with %lx
Change %lx to %p to print the secured pointer.
Signed-off-by: Guo Zhi <qtxuning1999@sjtu.edu.cn>
---
drivers/scsi/advansys.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index ffb391967573..97be0765cb9b 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -3308,8 +3308,8 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost)
shost->host_no);
seq_printf(m,
- " iop_base 0x%lx, cable_detect: %X, err_code %u\n",
- (unsigned long)v->iop_base,
+ " iop_base 0x%p, cable_detect: %X, err_code %u\n",
+ v->iop_base,
AdvReadWordRegister(iop_base,IOPW_SCSI_CFG1) & CABLE_DETECT,
v->err_code);
--
2.33.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers/scsi: Fix kernel pointer leak
2021-09-29 12:25 [PATCH] drivers/scsi: Fix kernel pointer leak Guo Zhi
@ 2021-10-12 20:35 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-10-12 20:35 UTC (permalink / raw)
To: James E.J. Bottomley, Guo Zhi, Hannes Reinecke, Matthew Wilcox
Cc: Martin K . Petersen, linux-scsi, linux-kernel
On Wed, 29 Sep 2021 20:25:37 +0800, Guo Zhi wrote:
> Pointers should be printed with %p or %px rather than cast to
> 'unsigned long' and pinted with %lx
> Change %lx to %p to print the secured pointer.
>
>
Applied to 5.16/scsi-queue, thanks!
[1/1] drivers/scsi: Fix kernel pointer leak
https://git.kernel.org/mkp/scsi/c/d4996c6eac4c
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-12 20:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29 12:25 [PATCH] drivers/scsi: Fix kernel pointer leak Guo Zhi
2021-10-12 20:35 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).