All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Yuwei Chen" <2522445001@qq.com>
Cc: sparclinux@vger.kernel.org
Subject: Re: [PATCH] sbus: fix device node leak in openprom_init()
Date: Fri, 04 Dec 2026 13:23:24 +0000	[thread overview]
Message-ID: <sashiko-outbox-249860@kernel.org> (raw)
In-Reply-To: <tencent_DC660D945BBBF4A260290AD4396EBF242909@qq.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] sbus: Fixes tag cites unrelated commit a88b5ba8bd8a
--

commit 5ed223b9ec480bcbbd1c3a4665050fd8fa592969
Author: Yuwei Chen <2522445001@qq.com>

> sbus: fix device node leak in openprom_init()
>
> openprom_init() looks up "/" with of_find_node_by_path() and passes
> that node to of_get_child_by_name(). The child lookup takes its own
> reference on "options" and does not drop the root. The root pointer
> is discarded. "options" is kept for the life of the driver and is not
> dropped in openprom_cleanup().
>
> The root reference has been leaked since sparc started using the
> generic OF lookup, which increments the refcount. The "options"
> reference was added when the open-coded sibling walk was replaced by
> of_get_child_by_name().
>
> Drop the root after the child lookup. Drop "options" when the module
> unloads.
>
> Fixes: a88b5ba8bd8a ("sparc,sparc64: unify kernel/")
> Fixes: df58f37b5d8f ("sbus: Use of_get_child_by_name helper")
> Cc: stable@vger.kernel.org
> Signed-off-by: Yuwei Chen <2522445001@qq.com>

[Severity: Low]
Does the first Fixes tag point to the right commit?  Commit a88b5ba8bd8a
("sparc,sparc64: unify kernel/") only moved files under arch/sparc/ and
updated Makefiles.  The commit that switched sparc to the refcounting
generic of_find_node_by_path() implementation in drivers/of/base.c is:

  Fixes: 1ef4d4242d9c ("Consolidate of_find_node_by routines")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_DC660D945BBBF4A260290AD4396EBF242909@qq.com?part=1

      reply	other threads:[~2026-12-04 13:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 12:40 [PATCH] sbus: fix device node leak in openprom_init() Yuwei Chen
2026-12-04 13:23 ` sashiko-bot [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=sashiko-outbox-249860@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=2522445001@qq.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sparclinux@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 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.