Skip to content

Commit ae2619d

Browse files
Geetha sowjanyadavem330
authored andcommitted
octeontx2-af: Fix irq free in rvu teardown
Current devlink code try to free already freed irqs as the irq_allocate flag is not cleared after free leading to kernel crash while removing rvu driver. The patch fixes the irq free sequence and clears the irq_allocate flag on free. Fixes: 7304ac4 ("octeontx2-af: Add mailbox IRQ and msg handlers") Signed-off-by: Geetha sowjanya <gakula@marvell.com> Signed-off-by: Hariprasad Kelam <hkelam@marvell.com> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 2978878 commit ae2619d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • drivers/net/ethernet/marvell/octeontx2/af

‎drivers/net/ethernet/marvell/octeontx2/af/rvu.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,8 +2462,10 @@ static void rvu_unregister_interrupts(struct rvu *rvu)
24622462
INTR_MASK(rvu->hw->total_pfs) & ~1ULL);
24632463

24642464
for (irq = 0; irq < rvu->num_vec; irq++) {
2465-
if (rvu->irq_allocated[irq])
2465+
if (rvu->irq_allocated[irq]) {
24662466
free_irq(pci_irq_vector(rvu->pdev, irq), rvu);
2467+
rvu->irq_allocated[irq] = false;
2468+
}
24672469
}
24682470

24692471
pci_free_irq_vectors(rvu->pdev);
@@ -2975,8 +2977,8 @@ static void rvu_remove(struct pci_dev *pdev)
29752977
struct rvu *rvu = pci_get_drvdata(pdev);
29762978

29772979
rvu_dbg_exit(rvu);
2978-
rvu_unregister_interrupts(rvu);
29792980
rvu_unregister_dl(rvu);
2981+
rvu_unregister_interrupts(rvu);
29802982
rvu_flr_wq_destroy(rvu);
29812983
rvu_cgx_exit(rvu);
29822984
rvu_fwdata_exit(rvu);

0 commit comments

Comments
 (0)