Message ID | 20200416155740.o3mzl7c73g4xkrmr@linutronix.de |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | [net] amd-xgbe: Use __napi_schedule() in BH context | expand |
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 16 Apr 2020 17:57:40 +0200 > The driver uses __napi_schedule_irqoff() which is fine as long as it is > invoked with disabled interrupts by everybody. Since the commit > mentioned below the driver may invoke xgbe_isr_task() in tasklet/softirq > context. This may lead to list corruption if another driver uses > __napi_schedule_irqoff() in IRQ context. > > Use __napi_schedule() which safe to use from IRQ and softirq context. > > Fixes: 85b85c853401d ("amd-xgbe: Re-issue interrupt if interrupt status not cleared") > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > Acked-by: Tom Lendacky <thomas.lendacky@amd.com> Applied and queued up for -stable, thanks.
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c index b71f9b04a51e1..a87264f95f1a4 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c @@ -514,7 +514,7 @@ static void xgbe_isr_task(unsigned long data) xgbe_disable_rx_tx_ints(pdata); /* Turn on polling */ - __napi_schedule_irqoff(&pdata->napi); + __napi_schedule(&pdata->napi); } } else { /* Don't clear Rx/Tx status if doing per channel DMA