[PATCH net-next v6 0/4] net: stmmac: fix DMA descriptor ring cleanup issues

Paolo Abeni pabeni at redhat.com
Thu Oct 29 03:24:17 PDT 2026


On 10/24/26 09:13, Ding Hui wrote:
> From: Ding Hui <dinghui at lixiang.com>
> 
> Hello,
> 
> This series fixes the NULL pointer dereferences in the stmmac TX/RX
> DMA resource cleanup paths and the associated error path issues,
> found on a DWMAC platform whose descriptor ring allocation may fail
> under memory pressure.
> 
> Patch 1 adds NULL guards in the free helpers and makes them clear
> the pointers they free, so that a NULL pointer reliably means "not
> allocated" for the long-lived priv->dma_conf.
> 
> Patch 2 makes the per-queue allocation functions undo their own
> allocations on error, instead of leaving the cleanup to the outer
> error paths that would then walk partially-initialized queues.
> 
> Patch 3 releases the descriptor resources through priv->dma_conf
> when __stmmac_open() fails after copying the temporary dma_conf, so
> the long-lived configuration stays consistent with the resource
> cleanup.
> 
> Patch 4 holds RTNL around the descriptors_status debugfs reader and
> skips queues whose rings are not allocated.
## Form letter - net-next-closed

The merge window for Linux v7.4 has begun, and the net-next
tree is now closed for new drivers, features, code refactoring
and optimizations. We are currently accepting bug fixes only.

Please repost when net-next reopens. There is some uncertainty
about how long this merge window will last, so please check
https://netdev.bots.linux.dev/net-next.html
before reposting. net-next _may_ reopen on Nov 2nd.

See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle




More information about the linux-arm-kernel mailing list