From: Andi Shyti <andi.shyti@kernel.org>
To: Linkai Gong <gonglinkai@kylinos.cn>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
Peter Rosin <peda@lysator.liu.se>,
Xiaoke Wang <xkernel.wang@foxmail.com>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: mux: demux-pinctrl: fix OF node leak on kstrdup failure
Date: Mon, 17 Aug 2026 00:19:29 +0200 [thread overview]
Message-ID: <aoI3QhFbfsRLEJD1@zenone.zhora.eu> (raw)
In-Reply-To: <20260813095617.2246320-1-gonglinkai@kylinos.cn>
Hi Linkai,
On Thu, Aug 13, 2026 at 05:56:17PM +0800, Linkai Gong wrote:
> of_parse_phandle() takes a reference on the parent node. If a later
> devm_kstrdup() fails, err_rollback only releases nodes for indices
> 0..i-1, so the current node is leaked.
>
> of_node_put() the current parent before rolling back.
>
> Fixes: 7c0195fa9a9e ("i2c: mux: demux-pinctrl: check the return value of devm_kstrdup()")
> Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
merged to i2c/i2c-2.
Thanks,
Andi
prev parent reply other threads:[~2026-08-16 22:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 9:56 Linkai Gong
2026-08-16 22:19 ` Andi Shyti [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=aoI3QhFbfsRLEJD1@zenone.zhora.eu \
--to=andi.shyti@kernel.org \
--cc=gonglinkai@kylinos.cn \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@lysator.liu.se \
--cc=wsa+renesas@sang-engineering.com \
--cc=xkernel.wang@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
all inboxes | Powered by JetHome®