From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A98AC4582DD; Tue, 21 Jul 2026 22:20:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784672437; cv=none; b=cY43ow/0qzg1QFgsW8gMCmEYan0yGH1J/qvnh3nPGiLi6UhwQEDTzk2ui2yqRvbnGSS+pIcLRheOrEJ6A8iulM53vteUf5dMp7hzarS5SXEFTBZ0mwIGB+qb0cVjQkeupoZQIT/9ilmfCBHvxU+S/EA4RPdbl6oO+O6lZIMnynU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784672437; c=relaxed/simple; bh=pJWiw3ByGuPU+KW8iS3GAFhunL6k1eygzq7+ShBR45w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Eckkmq0AWBoFfTzNo3IaOspm2ZiZ4S1pQSxL3469mB4nzYr/ILoelfObkljk3reURHA69/EdDbVx1WCSSmkQOT3ceMg8959evDNneUn6+G2EFjfeEqyTdydycUK4YKy+1+wxFN6Wkr0hEDbOe1ZC8xWREc4rrizuq+MZyp5s7Zo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZS3Hii1d; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ZS3Hii1d" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C9191F000E9; Tue, 21 Jul 2026 22:20:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784672436; bh=abr1NZ7yd89aanHmb2CLtKA6xp94ruvRiYcLc6FqEag=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ZS3Hii1dUpmh+mx6QoP7ctu2kNntvSXIh52Og4JiodV63O2n5hqhbih2B79erhRiJ SGudu+sEY1P2XNxeXNnx+BQ9b8mUi7qJ1FxeotbFZmawK5YuNqNZ+Td138XO99nzIV J2tgKt0BlGbKR1GuNPli1Z2vqJ8bz3pnQzSzwxRs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Martin Wilck , Don Brace , storagedev@microchip.com, Hannes Reinecke , Hannes Reinecke , Christoph Hellwig , "Martin K. Petersen" Subject: [PATCH 5.15 623/843] scsi: smartpqi: Use shost_to_hba() in pqi_scan_finished() Date: Tue, 21 Jul 2026 17:24:18 +0200 Message-ID: <20260721152420.074669743@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152405.946368001@linuxfoundation.org> References: <20260721152405.946368001@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Martin Wilck commit 57db1307afb1f83d45f5ff53b93f8d040100d13e upstream. 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 Reviewed-by: Don Brace Cc: Don Brace Cc: storagedev@microchip.com Cc: stable@vger.kernel.org Reviewed-by: Hannes Reinecke Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Link: https://patch.msgid.link/20260513174236.430465-2-mwilck@suse.com Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/smartpqi/smartpqi_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -2401,7 +2401,7 @@ static int pqi_scan_finished(struct Scsi { 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); }