From: Martin Wilck <martin.wilck@suse.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>,
Don Brace <don.brace@microchip.com>,
ranjan.kumar@broadcom.com
Cc: linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
Lee Duncan <lduncan@suse.com>, Martin Wilck <mwilck@suse.com>,
mpi3mr-linuxdrv.pdl@broadcom.com,
Martin Wilck <martin.wilck@suse.com>,
storagedev@microchip.com, stable@vger.kernel.org
Subject: [PATCH v3 1/2] scsi: smartpqi: use shost_to_hba() in pqi_scan_finished()
Date: Wed, 13 May 2026 19:42:35 +0200 [thread overview]
Message-ID: <20260513174236.430465-2-mwilck@suse.com> (raw)
In-Reply-To: <20260513174236.430465-1-mwilck@suse.com>
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
next prev parent reply other threads:[~2026-05-13 17:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 17:42 [PATCH v3 0/2] Fix SAS wildcard scan on smartpqi and other controllers Martin Wilck
2026-05-13 17:42 ` Martin Wilck [this message]
2026-05-13 17:42 ` [PATCH v3 2/2] Revert "scsi: Fix sas_user_scan() to handle wildcard and multi-channel scans" Martin Wilck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260513174236.430465-2-mwilck@suse.com \
--to=martin.wilck@suse.com \
--cc=don.brace@microchip.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=lduncan@suse.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mpi3mr-linuxdrv.pdl@broadcom.com \
--cc=mwilck@suse.com \
--cc=ranjan.kumar@broadcom.com \
--cc=stable@vger.kernel.org \
--cc=storagedev@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox