]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: lpfc: Fix lpfc_check_sli_ndlp() handling for GEN_REQUEST64 commands
authorJustin Tee <justin.tee@broadcom.com>
Fri, 25 Apr 2025 19:47:59 +0000 (12:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:34 +0000 (11:07 +0100)
commit0dfe03ec5d93eebab0c038f3541edd34beb72c4c
tree81b3ffb02c5c7202cf36d503c77beb642ef5f554
parent7d8c7994d806f720f2e54fc867aa76b869ea13b1
scsi: lpfc: Fix lpfc_check_sli_ndlp() handling for GEN_REQUEST64 commands

[ 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 <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20250425194806.3585-2-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/lpfc/lpfc_hbadisc.c