Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

amd-xgbe: Use __napi_schedule() in BH context

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>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sebastian Andrzej Siewior and committed by
David S. Miller
d518691c 05eab4f3

+1 -1
+1 -1
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
··· 514 514 xgbe_disable_rx_tx_ints(pdata); 515 515 516 516 /* Turn on polling */ 517 - __napi_schedule_irqoff(&pdata->napi); 517 + __napi_schedule(&pdata->napi); 518 518 } 519 519 } else { 520 520 /* Don't clear Rx/Tx status if doing per channel DMA