From: "Michael Walle" <mwalle@kernel.org>
To: "Wentao Liang" <vulab@iscas.ac.cn>, <gregkh@linuxfoundation.org>
Cc: <linux-kernel@vger.kernel.org>, <miquel.raynal@bootlin.com>,
<srini@kernel.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH] nvmem: layouts: sl28vpd: Fix np reference leak in sl28vpd_add_cells()
Date: Thu, 17 Sep 2026 15:52:05 +0200 [thread overview]
Message-ID: <DLHN33YH1DJ3.2UNJ1EY6IU69Q@kernel.org> (raw)
In-Reply-To: <20260917123735.2151431-1-vulab@iscas.ac.cn>
[-- Attachment #1: Type: text/plain, Size: 634 bytes --]
On Thu Sep 17, 2026 at 2:37 PM CEST, Wentao Liang wrote:
> of_get_child_by_name() returns a node with an elevated reference count.
> nvmem_add_one_cell() only takes ownership of that reference on success,
> so the caller must drop it when the call fails. Add the missing
> of_node_put() before returning so that info.np is not leaked.
>
> Fixes: d9fae023fe86 ("nvmem: layouts: sl28vpd: Add new layout driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
There was already a patch fixing this:
https://lore.kernel.org/r/tencent_65156571568C9E4076E52D1825CC5F476A08@qq.com/
-michael
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
prev parent reply other threads:[~2026-09-17 13:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 12:37 [PATCH] nvmem: layouts: sl28vpd: Fix np reference leak in sl28vpd_add_cells() Wentao Liang
2026-09-17 13:52 ` Michael Walle [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=DLHN33YH1DJ3.2UNJ1EY6IU69Q@kernel.org \
--to=mwalle@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=srini@kernel.org \
--cc=stable@vger.kernel.org \
--cc=vulab@iscas.ac.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.