Netdev List
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Linkai Gong <gonglinkai@kylinos.cn>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2] net: stmmac: platform: use scoped child loops in stmmac_mtl_setup()
Date: Thu, 20 Aug 2026 11:15:38 +0200	[thread overview]
Message-ID: <f5dad83e-e940-4526-9299-596239ee3d39@redhat.com> (raw)
In-Reply-To: <20260820012339.3231289-1-gonglinkai@kylinos.cn>

On 8/20/26 3:23 AM, Linkai Gong wrote:
> for_each_child_of_node() takes a reference on the current child. Breaking
> out of the RX loop leaks that node because the TX loop then overwrites
> q_node. The TX loop has the same break, and only happens to be safe
> because of_node_put(q_node) at the out label drops the last TX child.
> 
> Use for_each_child_of_node_scoped() for both loops so the child is put
> on every exit, including break, and drop the out-label put of q_node.
> 
> Fixes: d976a525c371 ("net: stmmac: multiple queues dt configuration")
> Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
## Form letter - net-next-closed

We have already submitted our pull request with net-next material for v7.3,
and therefore net-next is closed for new drivers, features, code refactoring
and optimizations. We are currently accepting bug fixes only.

Please repost when net-next reopens after Aug 31st.

RFC patches sent for review only are obviously welcome at any time.

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


      reply	other threads:[~2026-08-20  9:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19  7:32 [PATCH] net: stmmac: platform: fix of_node leak when breaking RX queue loop Linkai Gong
2026-08-19 13:00 ` Andrew Lunn
2026-08-20  1:20   ` Linkai Gong
2026-08-20  1:23 ` [PATCH net-next v2] net: stmmac: platform: use scoped child loops in stmmac_mtl_setup() Linkai Gong
2026-08-20  9:15   ` Paolo Abeni [this message]

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=f5dad83e-e940-4526-9299-596239ee3d39@redhat.com \
    --to=pabeni@redhat.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gonglinkai@kylinos.cn \
    --cc=kuba@kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    /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