[PATCH v1] scsi: be2iscsi: Fix MSI-X IRQ cleanup
Yuho Choi <[email protected]> Sun, 2 Aug 2026 21:42:24 -0400
| Newsgroups | org.kernel.vger.linux-scsi,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
beiscsi_init_irqs() uses j to walk previously registered MSI-X vectors
when unwinding an allocation or request_irq() failure, but passes i to
pci_irq_vector(). Consequently, each free_irq() targets the failing
vector instead of the vector associated with be_eq[j].
Use j to release the same vector that was registered. This ensures all
successfully requested IRQs are freed before initialization failure tears
down the HBA.
Fixes: 831488669a33 ("scsi: be2iscsi: switch to pci_alloc_irq_vectors")
Signed-off-by: Yuho Choi <[email protected]>
---
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