From: Yuho Choi <dbgh9129@gmail.com>
To: Ketan Mukadam <ketan.mukadam@broadcom.com>,
"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Yuho Choi <dbgh9129@gmail.com>
Subject: [PATCH v1] scsi: be2iscsi: Fix MSI-X IRQ unwind on request failure
Date: Fri, 3 Jul 2026 01:30:55 -0400 [thread overview]
Message-ID: <20260703053055.141337-1-dbgh9129@gmail.com> (raw)
beiscsi_init_irqs() unwinds previously requested MSI-X IRQs if a later
request_irq() call fails. The unwind loop walks index j, but passed the
failing index i to pci_irq_vector(), so free_irq() did not use the same
IRQ and dev_id pair that was registered.
Use j for both the IRQ vector and be_eq entry when freeing previously
registered MSI-X IRQs.
Fixes: 831488669a33 ("scsi: be2iscsi: switch to pci_alloc_irq_vectors")
Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
---
drivers/scsi/be2iscsi/be_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index fd18d4d3d219..9833ab06b299 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -878,7 +878,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
return 0;
free_msix_irqs:
for (j = i - 1; j >= 0; j--) {
- free_irq(pci_irq_vector(pcidev, i), &phwi_context->be_eq[j]);
+ free_irq(pci_irq_vector(pcidev, j), &phwi_context->be_eq[j]);
kfree(phba->msi_name[j]);
}
return ret;
--
2.43.0
next reply other threads:[~2026-07-03 5:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 5:30 Yuho Choi [this message]
2026-07-03 5:47 ` [PATCH v1] scsi: be2iscsi: Fix MSI-X IRQ unwind on request failure sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260703053055.141337-1-dbgh9129@gmail.com \
--to=dbgh9129@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=ketan.mukadam@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox