blob: a370273d10b20b9c4b493bd43b57ac070050fd21 [file] [log] [blame]
From af8480c02f7d962e580c69a67d1a1f0eb22a2fe5 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <>
Date: Thu, 16 Apr 2020 17:57:40 +0200
Subject: [PATCH] amd-xgbe: Use __napi_schedule() in BH context
commit d518691cbd3be3dae218e05cca3f3fc9b2f1aa77 upstream.
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 <>
Acked-by: Tom Lendacky <>
Cc: Tom Lendacky <>
Signed-off-by: David S. Miller <>
Signed-off-by: Paul Gortmaker <>
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index 3dd0cecddba8..6d689ff3b74d 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)
/* Turn on polling */
- __napi_schedule_irqoff(&pdata->napi);
+ __napi_schedule(&pdata->napi);
} else {
/* Don't clear Rx/Tx status if doing per channel DMA