Skip to content

Commit 11e94cf

Browse files
Geetha sowjanyagregkh
authored andcommitted
octeontx2-af: Fix irq free in rvu teardown
[ Upstream commit ae2619d ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent da517ca commit 11e94cf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2151,8 +2151,10 @@ static void rvu_unregister_interrupts(struct rvu *rvu)
21512151
INTR_MASK(rvu->hw->total_pfs) & ~1ULL);
21522152

21532153
for (irq = 0; irq < rvu->num_vec; irq++) {
2154-
if (rvu->irq_allocated[irq])
2154+
if (rvu->irq_allocated[irq]) {
21552155
free_irq(pci_irq_vector(rvu->pdev, irq), rvu);
2156+
rvu->irq_allocated[irq] = false;
2157+
}
21562158
}
21572159

21582160
pci_free_irq_vectors(rvu->pdev);

0 commit comments

Comments
 (0)