* [PATCH v3 1/2] scsi: smartpqi: use shost_to_hba() in pqi_scan_finished()
[not found] <20260513174236.430465-1-mwilck@suse.com>
@ 2026-05-13 17:42 ` Martin Wilck
0 siblings, 0 replies; only message in thread
From: Martin Wilck @ 2026-05-13 17:42 UTC (permalink / raw)
To: Martin K. Petersen, Christoph Hellwig, Don Brace, ranjan.kumar
Cc: linux-scsi, Hannes Reinecke, Lee Duncan, Martin Wilck,
mpi3mr-linuxdrv.pdl, Martin Wilck, storagedev, stable
From: Martin Wilck <martin.wilck@suse.com>
shost_to_hba() is used everywhere except to obtain pqi_ctrl_info
from shosti, except in pqi_scan_finished(), where shost_priv() is used.
This causes one pointer dereference to be missed, as shost->hostdata
is a pointer in smartpqi. Fix it.
Fixes: 6c223761eb54 ("smartpqi: initial commit of Microsemi smartpqi driver")
Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Don Brace <don.brace@microchip.com>
Cc: Don Brace <don.brace@microchip.com>
Cc: storagedev@microchip.com
Cc: stable@vger.kernel.org
---
drivers/scsi/smartpqi/smartpqi_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 2026ac645d6a..5ec583dc2e7d 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -2642,7 +2642,7 @@ static int pqi_scan_finished(struct Scsi_Host *shost,
{
struct pqi_ctrl_info *ctrl_info;
- ctrl_info = shost_priv(shost);
+ ctrl_info = shost_to_hba(shost);
return !mutex_is_locked(&ctrl_info->scan_mutex);
}
--
2.54.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-13 17:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260513174236.430465-1-mwilck@suse.com>
2026-05-13 17:42 ` [PATCH v3 1/2] scsi: smartpqi: use shost_to_hba() in pqi_scan_finished() Martin Wilck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox