The 'irq_disabled' variable indicates the current state of the TX IRQ and is used by the TX 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 TX NAPI handler sees 'irq_disabled' set and invokes enable_irq() before the TX IRQ is actually disabled by disable_irq_nosync(). This results in the following warning: Unbalanced enable for IRQ ... Fix this by disabling the TX IRQ using disable_irq_nosync() before setting 'irq_disabled'. Fixes: 8756ef2eb078 ("net: ti: icssg-prueth: Add AF_XDP zero copy for TX") 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 0cf9dfe0fa36..24716c8d7f75 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_common.c +++ b/drivers/net/ethernet/ti/icssg/icssg_common.c @@ -348,8 +348,8 @@ static irqreturn_t prueth_tx_irq(int irq, void *dev_id) { struct prueth_tx_chn *tx_chn = dev_id; - tx_chn->irq_disabled = true; disable_irq_nosync(irq); + tx_chn->irq_disabled = true; napi_schedule(&tx_chn->napi_tx); return IRQ_HANDLED; -- 2.51.1