public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: shawn.lin@rock-chips.com, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	xiaopeitux@foxmail.com
Cc: Pei Xiao <xiaopei01@kylinos.cn>, Felix Gu <ustc.gu@gmail.com>
Subject: Re: [PATCH] soc: rockchip: grf: fix device node refcount leak in error path
Date: Sat, 21 Feb 2026 16:26:45 +0100	[thread overview]
Message-ID: <20948198.jiFIW2sfyF@diego> (raw)
In-Reply-To: <6295978.F8r316W7xa@diego>

Am Samstag, 21. Februar 2026, 15:51:46 Mitteleuropäische Normalzeit schrieb Heiko Stübner:
> Hi,
> 
> Am Samstag, 21. Februar 2026, 01:40:27 Mitteleuropäische Normalzeit schrieb xiaopeitux@foxmail.com:
> > From: Pei Xiao <xiaopei01@kylinos.cn>
> > 
> > The for_each_matching_node_and_match() macro automatically manages device
> > node reference counts during normal iteration. However, when breaking out
> > of the loop early with return, the current iteration's node is not
> > automatically released, leading to a reference count leak.
> > 
> > Fix this by adding of_node_put() before returning from the loop
> > when fails.
> > 
> > Fixes: 75fb63ae0312 ("soc: rockchip: grf: Support multiple grf to be handled")
> > Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
> 
> Felix Gu was slightly faster [0], so I'll apply their patch once the merge-
> window is closed.

and I just realized that Shawn was actually even earlier [1]

> 
> Thanks
> Heiko
> 
> 
> [0] http://lore.kernel.org/r/20260217-grf-v1-1-2088c966875d@gmail.com
[1] https://lore.kernel.org/all/1770814957-17762-1-git-send-email-shawn.lin@rock-chips.com/






      reply	other threads:[~2026-02-21 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-21  0:40 [PATCH] soc: rockchip: grf: fix device node refcount leak in error path xiaopeitux
2026-02-21 14:51 ` Heiko Stübner
2026-02-21 15:26   ` Heiko Stübner [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=20948198.jiFIW2sfyF@diego \
    --to=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=shawn.lin@rock-chips.com \
    --cc=ustc.gu@gmail.com \
    --cc=xiaopei01@kylinos.cn \
    --cc=xiaopeitux@foxmail.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