Skip to contentSkip to conversation

net: ethernet: mtk_eth_soc: pass eth to mtk_handle_irq_rx in poll_controller

PATCH New Mikhail Dmitrichenko 1 participant 1 message Oct 27

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ethernet: mtk_eth_soc: pass eth to mtk_handle_irq_rx in poll_controller

From: Chenguang Zhao <[email protected]>

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()")

[ 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"). ]

---
Backport fix for CVE-2026-80694

 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mediatek/mtk_eth_soc.c +1 -1
index dc29403e4b73..f1f0e1f59323 100644
@@ -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);
 }
Signature · 1 line
2.43.0