[PATCH 5.10/5.15] net: ethernet: mtk_eth_soc: pass eth to mtk_handle_irq_rx in poll_controller

DORMANTno replies

From: Mikhail Dmitrichenko <hidden>
Date: 2026-10-27 10:30:47
Also in: linux-arm-kernel, linux-mediatek, lkml, stable
Subsystem: mediatek ethernet driver, networking drivers, the rest · Maintainers: Felix Fietkau, Lorenzo Bianconi, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Chenguang Zhao <redacted>

commit e095f249e2209674f6366f6db0383a2b96e19239 upstream.

mtk_handle_irq_rx expects a struct mtk_eth * (matching the request_irq
cookie), but mtk_poll_controller incorrectly passed the net_device *.
Calling ndo_poll_controller with CONFIG_NET_POLL_CONTROLLER enabled
would then crash.

Fixes: 8186f6e382d8 ("net-next: mediatek: fix compile error inside mtk_poll_controller()")
Signed-off-by: Chenguang Zhao <redacted>
Link: https://patch.msgid.link/20260723055735.885112-1-chenguang.zhao@linux.dev (local)
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
[ mdmitrichenko: 5.10 and 5.15 still index the RX IRQ as eth->irq[2],
  the MTK_FE_IRQ_RX constant only came with commit 498190100992
  ("net: ethernet: mtk_eth_soc: add consts for irq index"). ]
Signed-off-by: Mikhail Dmitrichenko <redacted>
---
Backport fix for CVE-2026-80694
 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index dc29403e4b73..f1f0e1f59323 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -2230,7 +2230,7 @@ static void mtk_poll_controller(struct net_device *dev)
 
 	mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
 	mtk_rx_irq_disable(eth, MTK_RX_DONE_INT);
-	mtk_handle_irq_rx(eth->irq[2], dev);
+	mtk_handle_irq_rx(eth->irq[2], eth);
 	mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
 	mtk_rx_irq_enable(eth, MTK_RX_DONE_INT);
 }
-- 
2.43.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help