Re: [PATCH net-next v6 1/3] net: ethernet: mtk_eth_soc: fix the RX descriptor address on the release path
From: Sandeep Haemoon
Date: Fri Nov 13 2026 - 20:43:38 EST
On the automated "looks like a fix" inquiry for this series:
The change in 1/3 was found by an automated review, not in production. The
reviewer read the release path of mtk_poll_rx() and noticed that the guard
added by 6e0490fc36cd ("net: ethernet: mtk_eth_soc: fix SER panic with 4GB+
RAM") relies on dma_addr being DMA_MAPPING_ERROR on every release, while
e10a35abb3da ("net: ethernet: mtk_eth_soc: fix uninitialized variable") had
moved that initialisation out of the loop and left it valid across
iterations.
It has not been triggered at runtime by us. It needs MTK_36BIT_DMA, DRAM
above 4 GiB, and one of the early release paths (no netdev for the source
port, MTK_RESETTING set, or a refill allocation failure) so that descriptor
N+1 is handed back with the high address bits of the buffer that was mapped
for descriptor N. The visible symptom would be the engine writing the next
frame to an address that is neither buffer, and stale contents of the
untouched buffer going up the stack; there is no stack trace to report.
Hardware: the series as a whole was tested on a BPI-R4 Pro 8X (MT7988, 10G
port) on a 6.18.60 backport - 8K ICMP passes and iperf3 with MSS 8900 at
MTU 9000 reaches about 9.87 Gbit/s - but the 36-bit path fix itself was not
exercised there because the condition was never hit. The v7.3 series is
compile-tested with CONFIG_NET_MEDIATEK_SOC=y and COMPILE_TEST=y.
As suggested, this is a reply rather than a repost; please apply it to the
series.