mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 05:06:44 +07:00
net/mlx4_core: Call synchronize_irq() before freeing EQ buffer
After moving the EQ ownership to software effectively destroying it, call synchronize_irq() to ensure that any handler routines running on other CPU cores finish execution. Only then free the EQ buffer. The same thing is done when we destroy a CQ which is one of the sources generating interrupts. In the case of CQ we want to avoid completion handlers on a CQ that was destroyed. In the case we do the same to avoid receiving asynchronous events after the EQ has been destroyed and its buffers freed. Signed-off-by: Eli Cohen <eli@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
96e4be06cb
commit
bf1bac5b78
@ -1026,6 +1026,7 @@ static void mlx4_free_eq(struct mlx4_dev *dev,
|
|||||||
pr_cont("\n");
|
pr_cont("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
synchronize_irq(eq->irq);
|
||||||
|
|
||||||
mlx4_mtt_cleanup(dev, &eq->mtt);
|
mlx4_mtt_cleanup(dev, &eq->mtt);
|
||||||
for (i = 0; i < npages; ++i)
|
for (i = 0; i < npages; ++i)
|
||||||
|
Loading…
Reference in New Issue
Block a user