mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 5.10/5.15] net: ethernet: mtk_eth_soc: pass eth to mtk_handle_irq_rx in poll_controller
@ 2026-10-27 10:30 Mikhail Dmitrichenko
  0 siblings, 0 replies; only message in thread
From: Mikhail Dmitrichenko @ 2026-10-27 10:30 UTC (permalink / raw)
  To: stable, Greg Kroah-Hartman
  Cc: Mikhail Dmitrichenko, Sasha Levin, Chenguang Zhao, Felix Fietkau,
	Sean Wang, Mark Lee, Lorenzo Bianconi, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Matthias Brugger, AngeloGioacchino Del Regno, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel, lvc-project

From: Chenguang Zhao <zhaochenguang@kylinos.cn>

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 <zhaochenguang@kylinos.cn>
Link: https://patch.msgid.link/20260723055735.885112-1-chenguang.zhao@linux.dev
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 <mdmitrichenko@astralinux.ru>
---
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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-27 10:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-27 10:30 [PATCH 5.10/5.15] net: ethernet: mtk_eth_soc: pass eth to mtk_handle_irq_rx in poll_controller Mikhail Dmitrichenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®