mirror of
https://github.com/torvalds/linux.git
synced 2026-09-13 14:34:41 +02:00
scsi: pm8001: Use rollback index when freeing MSI-X vectors
pm8001_request_msix() unwinds previously registered handlers with
free_irq() when request_irq() fails. The rollback loop uses the failing
index i for every iteration instead of the already registered vector
index j.
That passes the wrong IRQ/dev_id pair to free_irq() and leaves the
earlier handlers installed. Use j for both pci_irq_vector() and the
matching irq_vector entry in the rollback loop.
Fixes: a76037ff34 ("scsi: pm8001: switch to pci_irq_alloc_vectors")
Cc: stable@vger.kernel.org
Assisted-by: Codex:GPT-5
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Link: https://patch.msgid.link/20260824113618.2239100-1-runyu.xiao@seu.edu.cn
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
parent
98f0a1422e
commit
3f92a64545
|
|
@ -1029,8 +1029,8 @@ static u32 pm8001_request_msix(struct pm8001_hba_info *pm8001_ha)
|
|||
&(pm8001_ha->irq_vector[i]));
|
||||
if (rc) {
|
||||
for (j = 0; j < i; j++) {
|
||||
free_irq(pci_irq_vector(pm8001_ha->pdev, i),
|
||||
&(pm8001_ha->irq_vector[i]));
|
||||
free_irq(pci_irq_vector(pm8001_ha->pdev, j),
|
||||
&pm8001_ha->irq_vector[j]);
|
||||
}
|
||||
pci_free_irq_vectors(pm8001_ha->pdev);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user