scsi: advansys: Don't call asc_prt_scsi_host() -> scsi_host_busy()
Subsystems (2)
PATCH 1/1 scsi: advansys: Don't call asc_prt_scsi_host() -> scsi_host_busy()
The driver calls asc_prt_scsi_host() -> scsi_host_busy() prior to calling scsi_add_host(). This should not be done, and has raised issues for other drivers, like [0].
Function asc_prt_scsi_host() only has a single callsite, as above, where the shost busy count would always be 0.
Avoid printing the shost busy count to avoid this problem.
[0] https://lore.kernel.org/linux-scsi/[email protected]/
drivers/scsi/advansys.c +1 -2
@@ -2401,8 +2401,7 @@ static void asc_prt_scsi_host(struct Scsi_Host *s)struct asc_board *boardp =shost_priv (s);printk ("Scsi_Host at addr 0x%p, device %s\n" , s,dev_name (boardp->dev)); -printk (" host_busy %d, host_no %d,\n" , -scsi_host_busy (s), s->host_no); +printk (" host_no %d,\n" , s->host_no);printk (" base 0x%lx, io_port 0x%lx, irq %d,\n" , (ulong )s->base, (ulong )s->io_port, boardp->irq);
Signature · 1 line
2.43.5
Quoted 19 lines · John Garry
The driver calls
asc_prt_scsi_host()->scsi_host_busy()prior to callingscsi_add_host(). This should not be done, and has raised issues for other drivers, like [0].Function
asc_prt_scsi_host()only has a single callsite, as above, where the shost busy count would always be 0.Avoid printing the shost busy count to avoid this problem.
[0] https://lore.kernel.org/linux-scsi/[email protected]/
Reported-by Bart Van Assche <[email protected]>Signed-off-by John Garry <[email protected]>drivers/scsi/advansys.c +0
-0
drivers/scsi/advansys.c static void asc_prt_scsi_host(struct Scsi_Host *s) · line 2403
Quoted 3 lines
drivers/scsi/advansys.c +0
-0@@ -2401,8 +2401,7 @@ static void asc_prt_scsi_host(struct Scsi_Host *s)struct asc_board *boardp =shost_priv (s);printk ("Scsi_Host at addr 0x%p, device %s\n" , s,dev_name (boardp->dev));
Printing the SCSI host address is not useful because pointer mangling is enabled by default.
drivers/scsi/advansys.c static void asc_prt_scsi_host(struct Scsi_Host *s) · line 2407
Quoted 6 lines
drivers/scsi/advansys.c +1
-2-printk (" host_busy %d, host_no %d,\n" , -scsi_host_busy (s), s->host_no); +printk (" host_no %d,\n" , s->host_no);printk (" base 0x%lx, io_port 0x%lx, irq %d,\n" , (ulong )s->base, (ulong )s->io_port, boardp->irq);
Anyway:
John,
Quoted 8 lines
The driver calls
asc_prt_scsi_host()->scsi_host_busy()prior to callingscsi_add_host(). This should not be done, and has raised issues for other drivers, like [0].Function
asc_prt_scsi_host()only has a single callsite, as above, where the shost busy count would always be 0.Avoid printing the shost busy count to avoid this problem.
Signature · 1 line
Martin K. Petersen
Martin K. Petersen
AppliedQuoted 8 lines · John Garry
The driver calls
asc_prt_scsi_host()->scsi_host_busy()prior to callingscsi_add_host(). This should not be done, and has raised issues for other drivers, like [0].Function
asc_prt_scsi_host()only has a single callsite, as above, where the shost busy count would always be 0.[...]
Applied to 6.19/scsi-queue, thanks!
[1/1] scsi: advansys: Don't call asc_prt_scsi_host() -> scsi_host_busy()
https://git.kernel.org/mkp/scsi/c/bb798c1f43c0
Signature · 1 line
Martin K. Petersen