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 0103A3FD4; Mon, 23 Jun 2025 21:48:31 +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=1750715312; cv=none; b=W1gRVU7UTbMP57UsF5jLu+rRvya/K9M9GGGC1s9LlDDuNsFLGT3w6DNPVXRBamsJwYSZh3FbDspPJjU55JiU7LN1oAsIMM/DDQzVpcR0Zn+MqaET0TE0/n4H/70Yl9SBZuT9cttAG8ORhSjJJbZzF0vkM42nrq0n4NgbgB8u+IE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750715312; c=relaxed/simple; bh=NKirTGx0w979S6YcN4TUr+G0zo9I+Wgk29of+wTYNSk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n3UUvr6eDg9+uPt5hvxP5+gjhb900zRYVVZjRVygq1vkDLXAsmAiYcESFi3qkym3DD0QQguHeGdWHpewWokGUTZdWfQbfkQnjHn3JD0CE77mM8FyZ+a0RwMpV8JzZn3RKIYGbusFrwYk4suaL/ux6izCBZqEzsgiomJnYOsV/gU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=f12gcmmk; 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="f12gcmmk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 834D2C4CEEA; Mon, 23 Jun 2025 21:48:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750715311; bh=NKirTGx0w979S6YcN4TUr+G0zo9I+Wgk29of+wTYNSk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f12gcmmk2ZlZpuOf4WYIMVI4Ov/uKgjjgcwHIfFxD1e+nssNdRPSlgPqcWxl8zspN GT+MzVLFUtSdXE7g5AdMV8fvncJbqO7t1LnElqTQH38rWPYRaQSYaVA59hYdJTgkXn vwGh1fvvFwWZ21A0HiTDiPu6O+N4p7A7pJartIW4= 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 5.10 267/355] scsi: lpfc: Fix lpfc_check_sli_ndlp() handling for GEN_REQUEST64 commands Date: Mon, 23 Jun 2025 15:07:48 +0200 Message-ID: <20250623130634.782842709@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130626.716971725@linuxfoundation.org> References: <20250623130626.716971725@linuxfoundation.org> User-Agent: quilt/0.68 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.10-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 353c360b0c6ab..ca91527a18070 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -4772,7 +4772,7 @@ lpfc_check_sli_ndlp(struct lpfc_hba *phba, case CMD_GEN_REQUEST64_CR: if (iocb->context_un.ndlp == ndlp) return 1; - fallthrough; + break; case CMD_ELS_REQUEST64_CR: if (icmd->un.elsreq64.remoteID == ndlp->nlp_DID) return 1; -- 2.39.5