mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Ding Hui <dinghui1111@163.com>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	"open list:STMMAC ETHERNET DRIVER" <netdev@vger.kernel.org>,
	"moderated list:ARM/STM32 ARCHITECTURE"
	<linux-stm32@st-md-mailman.stormreply.com>,
	"moderated list:ARM/STM32 ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>,
	open list <linux-kernel@vger.kernel.org>
Cc: dinghui@lixiang.com, xiasanbo@lixiang.com,
	yangchen11@lixiang.com, liuxuanjun@lixiang.com
Subject: Re: [PATCH net-next v6 0/4] net: stmmac: fix DMA descriptor ring cleanup issues
Date: Thu, 29 Oct 2026 11:24:17 +0100	[thread overview]
Message-ID: <3fdea60e-abe8-4ecc-bce2-672f4e3d6b47@redhat.com> (raw)
In-Reply-To: <20261024071319.875921-1-dinghui1111@163.com>

On 10/24/26 09:13, Ding Hui wrote:
> From: Ding Hui <dinghui@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


  parent reply	other threads:[~2026-10-29 10:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-24  7:13 Ding Hui
2026-10-24  7:13 ` [PATCH net-next v6 1/4] net: stmmac: guard against NULL pointers when freeing TX/RX buffers Ding Hui
2026-10-24  7:13 ` [PATCH net-next v6 2/4] net: stmmac: clean up partially allocated DMA rings on error Ding Hui
2026-10-24  7:13 ` [PATCH net-next v6 3/4] net: stmmac: release descriptor resources through priv->dma_conf on open failure Ding Hui
2026-10-24  7:13 ` [PATCH net-next v6 4/4] net: stmmac: hold RTNL when reading descriptor rings in descriptors_status Ding Hui
2026-10-24  7:21 ` [PATCH net-next v6 0/4] net: stmmac: fix DMA descriptor ring cleanup issues netdev-bot+sinfo
2026-10-29 10:24 ` Paolo Abeni [this message]
2026-10-29 15:40   ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3fdea60e-abe8-4ecc-bce2-672f4e3d6b47@redhat.com \
    --to=pabeni@redhat.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dinghui1111@163.com \
    --cc=dinghui@lixiang.com \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=liuxuanjun@lixiang.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiasanbo@lixiang.com \
    --cc=yangchen11@lixiang.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®