net: ethernet: mtk_eth_soc: pass eth to mtk_handle_irq_rx in poll_controller
Subsystems (4)
PATCH v2 1/1 net: ethernet: mtk_eth_soc: pass eth to mtk_handle_irq_rx in poll_controller
From: Chenguang Zhao <[email protected]>
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.
---
v2:
- Add SOB and Fixes tag.
v1:
https://lore.kernel.org/all/[email protected]/
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
@@ -3467,7 +3467,7 @@ static void mtk_poll_controller(struct net_device *dev)mtk_tx_irq_disable (eth,MTK_TX_DONE_INT );mtk_rx_irq_disable (eth, eth->soc->rx.irq_done_mask); -mtk_handle_irq_rx (eth->irq[MTK_FE_IRQ_RX ], dev); +mtk_handle_irq_rx (eth->irq[MTK_FE_IRQ_RX ], eth);mtk_tx_irq_enable (eth,MTK_TX_DONE_INT );mtk_rx_irq_enable (eth, eth->soc->rx.irq_done_mask); }
Signature · 1 line
2.25.1
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:
Quoted 8 lines · On Thu, 23 Jul 2026 13:57:35 +0800 you wrote:
From: Chenguang Zhao <[email protected]>
mtk_handle_irq_rxexpects a structmtk_eth* (matching therequest_irqcookie), butmtk_poll_controllerincorrectly passed thenet_device*. Callingndo_poll_controllerwithCONFIG_NET_POLL_CONTROLLERenabled would then crash.[...]
Here is the summary with links:
- [net,v2] net: ethernet: mtk_eth_soc: pass eth to mtk_handle_irq_rx in poll_controller
https://git.kernel.org/netdev/net/c/e095f249e220
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html