Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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/20251014200118.3390839-3-bvanassche@acm.org/

Reported-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20251023085451.3933666-1-john.g.garry@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

John Garry and committed by
Martin K. Petersen
bb798c1f dcc98c11

+1 -2
+1 -2
drivers/scsi/advansys.c
··· 2401 2401 struct asc_board *boardp = shost_priv(s); 2402 2402 2403 2403 printk("Scsi_Host at addr 0x%p, device %s\n", s, dev_name(boardp->dev)); 2404 - printk(" host_busy %d, host_no %d,\n", 2405 - scsi_host_busy(s), s->host_no); 2404 + printk(" host_no %d,\n", s->host_no); 2406 2405 2407 2406 printk(" base 0x%lx, io_port 0x%lx, irq %d,\n", 2408 2407 (ulong)s->base, (ulong)s->io_port, boardp->irq);