mirror of https://gitee.com/openkylin/linux.git
scsi: advansys: Fix kernel pointer leak
[ Upstream commit d4996c6eac
]
Pointers should be printed with %p or %px rather than cast to 'unsigned
long' and printed with %lx.
Change %lx to %p to print the hashed pointer.
Link: https://lore.kernel.org/r/20210929122538.1158235-1-qtxuning1999@sjtu.edu.cn
Signed-off-by: Guo Zhi <qtxuning1999@sjtu.edu.cn>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
7f37066e0d
commit
27490ae6a8
|
@ -3308,8 +3308,8 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost)
|
||||||
shost->host_no);
|
shost->host_no);
|
||||||
|
|
||||||
seq_printf(m,
|
seq_printf(m,
|
||||||
" iop_base 0x%lx, cable_detect: %X, err_code %u\n",
|
" iop_base 0x%p, cable_detect: %X, err_code %u\n",
|
||||||
(unsigned long)v->iop_base,
|
v->iop_base,
|
||||||
AdvReadWordRegister(iop_base,IOPW_SCSI_CFG1) & CABLE_DETECT,
|
AdvReadWordRegister(iop_base,IOPW_SCSI_CFG1) & CABLE_DETECT,
|
||||||
v->err_code);
|
v->err_code);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue