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 2DA4EC2E0; Mon, 23 Jun 2025 21:31:09 +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=1750714270; cv=none; b=HzWBbcY2XmZGGMk1oaQmPhjMM3SALSTtQa5sk+SDYENyuDaSV0qRyX36LkjM5HrEw9p+iwt41dB80Mo24iejyG/VXEZIH31attPoXA4q1a7j0l/veNMvOym4ZLwg2NngTgZtEZ8c9VbG0vZ6G4RA2skC43Iv0ckD42w/K5ZmnDI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750714270; c=relaxed/simple; bh=vz1SigTDeJxvy0gYSTFRiiAVI946DRoPOLnr8/GYKP0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rpbY+WIgVv1qN20BOLJMKe0XlmaEOVEwnB70cEwetiFJOfd51rWOs1HmjrxnOI6liqOiwPNbI+01fcoQhIT+J4bSabB0kmtJMzlcsIMhPWZ180eWR/XnPqj6gTxLvwxhYAFbTop4iVFPIxXEvrXpXl2r72ioOukGZbKwAB4MU7U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dGL3CUR5; 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="dGL3CUR5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AC27C4CEEA; Mon, 23 Jun 2025 21:31:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750714269; bh=vz1SigTDeJxvy0gYSTFRiiAVI946DRoPOLnr8/GYKP0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dGL3CUR5Yd4lmNV4xw3FR3AwTKgcCJr2+tODvKkKcsBOmSnCFrPCN8zV3099Oiy0n jBWhsdmBHgoOA4RDu7hL7HSLDegSAx9svfwgF1ayzyAvKiRh7+I0fLba60qcRxyyIr /ytUP5l+qfiV9SghpWHvu7h2RQQoV6b90i07nlZE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Justin Tee , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 6.15 380/592] scsi: lpfc: Fix lpfc_check_sli_ndlp() handling for GEN_REQUEST64 commands Date: Mon, 23 Jun 2025 15:05:38 +0200 Message-ID: <20250623130709.477433683@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130700.210182694@linuxfoundation.org> References: <20250623130700.210182694@linuxfoundation.org> User-Agent: quilt/0.68 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.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Justin Tee [ Upstream commit 05ae6c9c7315d844fbc15afe393f5ba5e5771126 ] In lpfc_check_sli_ndlp(), the get_job_els_rsp64_did remote_id assignment does not apply for GEN_REQUEST64 commands as it only has meaning for a ELS_REQUEST64 command. So, if (iocb->ndlp == ndlp) is false, we could erroneously return the wrong value. Fix by replacing the fallthrough statement with a break statement before the remote_id check. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20250425194806.3585-2-justintee8345@gmail.com Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/lpfc/lpfc_hbadisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index c2ec4db672869..c256c3edd6639 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -5055,7 +5055,7 @@ lpfc_check_sli_ndlp(struct lpfc_hba *phba, case CMD_GEN_REQUEST64_CR: if (iocb->ndlp == ndlp) return 1; - fallthrough; + break; case CMD_ELS_REQUEST64_CR: if (remote_id == ndlp->nlp_DID) return 1; -- 2.39.5