The 'irq_disabled' variable indicates the current state of the RX IRQ and is used by the RX NAPI handler to determine whether the IRQ should be enabled. Currently, 'irq_disabled' is set before actually disabling the IRQ by invoking disable_irq_nosync(). In an SMP environment, this leads to a race condition wherein the processor taking the interrupt sets 'irq_disabled' while another processor executing a previous instance of the RX NAPI handler sees 'irq_disabled' set and invokes enable_irq() before the RX IRQ is actually disabled by disable_irq_nosync(). This results in the following warning: Unbalanced enable for IRQ ... Fix this by disabling the RX IRQ using disable_irq_nosync() before setting 'irq_disabled'. Fixes: 7a64bb388df3 ("net: ti: icssg-prueth: Add AF_XDP zero copy for RX") Cc: Signed-off-by: Siddharth Vadapalli --- drivers/net/ethernet/ti/icssg/icssg_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/icssg/icssg_common.c b/drivers/net/ethernet/ti/icssg/icssg_common.c index 24716c8d7f75..a512a1317c59 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_common.c +++ b/drivers/net/ethernet/ti/icssg/icssg_common.c @@ -1385,8 +1385,8 @@ irqreturn_t prueth_rx_irq(int irq, void *dev_id) { struct prueth_emac *emac = dev_id; - emac->rx_chns.irq_disabled = true; disable_irq_nosync(irq); + emac->rx_chns.irq_disabled = true; napi_schedule(&emac->napi_rx); return IRQ_HANDLED; -- 2.51.1