From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0E59B1ABEB7; Mon, 14 Oct 2024 14:47:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728917235; cv=none; b=uBocd0U8BzQnXYPMm74OXEvokmH1QHMPGN1W/ged6ZrNelZjdXLOtP8JTrhjjolottVpH1Ahi4fHiBcVzMgZEXZZN2fgVd5p4mGN6PMrUQu0dSkKBBnNB1e2FL9fQIGd7VYUszdVLcrIOkAFhTMOiuxl400EGvuyzs8jdpP2iLk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728917235; c=relaxed/simple; bh=025uWzUSr1zlbiq99DhlQy9H13g6K3lTM/R0nn6RX9k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=A9v717M6EgVhf8NW/UE7k06dYBqmHGeh+nmdbmXxr3keAhxrsaI6ND9ENTYpVx2mhxD0EiTYGQhwdJUFgDv6ljIfcJEGo0VaRC3otXr7G3WTwnuh8tsy02nXqVKi+UM1qnLw1QjSFRq4IwdXHXUpgi2Jdst3hB61JYxWhRSxSaI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FvC8igzT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="FvC8igzT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75E4AC4CEC3; Mon, 14 Oct 2024 14:47:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728917234; bh=025uWzUSr1zlbiq99DhlQy9H13g6K3lTM/R0nn6RX9k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FvC8igzTP4rZ6WIQjQ7KA3rjvBI9h3JCO1kXK0bq+U0psM/243nsv93zskWrRtZvO /8bpTYQnHbmq/gzwQw2JIVlaA1QAIl9nKIiKN7TOhrQC5zaXikjF/SQjb2yrn/8j5G cBFGx6gqLULdXFX/MzkfUN4mMBC+LrNg4XiXJY6I= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Daniel Palmer , Michael Schmitz , stable@kernel.org, Finn Thain , Bart Van Assche , "Martin K. Petersen" Subject: [PATCH 6.6 192/213] scsi: wd33c93: Dont use stale scsi_pointer value Date: Mon, 14 Oct 2024 16:21:38 +0200 Message-ID: <20241014141050.455606304@linuxfoundation.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241014141042.954319779@linuxfoundation.org> References: <20241014141042.954319779@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Daniel Palmer commit 9023ed8d91eb1fcc93e64dc4962f7412b1c4cbec upstream. A regression was introduced with commit dbb2da557a6a ("scsi: wd33c93: Move the SCSI pointer to private command data") which results in an oops in wd33c93_intr(). That commit added the scsi_pointer variable and initialized it from hostdata->connected. However, during selection, hostdata->connected is not yet valid. Fix this by getting the current scsi_pointer from hostdata->selecting. Cc: Daniel Palmer Cc: Michael Schmitz Cc: stable@kernel.org Fixes: dbb2da557a6a ("scsi: wd33c93: Move the SCSI pointer to private command data") Signed-off-by: Daniel Palmer Co-developed-by: Finn Thain Signed-off-by: Finn Thain Link: https://lore.kernel.org/r/09e11a0a54e6aa2a88bd214526d305aaf018f523.1727926187.git.fthain@linux-m68k.org Reviewed-by: Michael Schmitz Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/wd33c93.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/scsi/wd33c93.c +++ b/drivers/scsi/wd33c93.c @@ -831,7 +831,7 @@ wd33c93_intr(struct Scsi_Host *instance) /* construct an IDENTIFY message with correct disconnect bit */ hostdata->outgoing_msg[0] = IDENTIFY(0, cmd->device->lun); - if (scsi_pointer->phase) + if (WD33C93_scsi_pointer(cmd)->phase) hostdata->outgoing_msg[0] |= 0x40; if (hostdata->sync_stat[cmd->device->id] == SS_FIRST) {