All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Wentao Liang" <vulab@iscas.ac.cn>, linux-i3c@lists.infradead.org
Cc: Frank.Li@kernel.org, "Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH v2] i3c: master: Fix fwnode reference leak in i3c_master_register_fwnode()
Date: Sun, 08 Nov 2026 09:41:28 +0000	[thread overview]
Message-ID: <sashiko-outbox-203661@kernel.org> (raw)
In-Reply-To: <20261108092920.314161-1-vulab@iscas.ac.cn>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] i3c: master: wrong Fixes trailer in commit message for
  i3c_master_rpm_get()
--

commit ba01aeefaeda899682ea26dfc02330d61d63300a
Author: Wentao Liang <vulab@iscas.ac.cn>

> i3c: master: Fix fwnode reference leak in i3c_master_register_fwnode()
>
> i3c_master_register_fwnode() takes a reference on the bus firmware node
> with fwnode_handle_get() and stores it in master->dev. That reference is
> normally dropped by i3c_masterdev_release(), which runs when the last
> reference on the master device is put.
>
> If i3c_master_rpm_get() fails, the function returns before
> device_initialize(), so put_device() is never called, the release
> callback never runs, and the reference is leaked.
>
> Release the reference explicitly on that path. of_node_put() is not
> enough here: it only acts on Open Firmware nodes, so the reference would
> still leak on ACPI and software node systems.
>
> The candidate was found with static analysis tools; DeepSeek and GPT-6.1
> Sol were used to audit it and to help prepare this fix.
>
> Fixes: 3a379bbcea0a ("i3c: Add core I3C infrastructure")
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>

[Severity: Low]
Should the Fixes: tag reference 990c149c61ee ("i3c: master: Introduce
optional Runtime PM support") instead?

The original error return before device_initialize() in 3a379bbcea0a
("i3c: Add core I3C infrastructure") was fixed by 9d4f219807d5 ("i3c: fix
refcount inconsistency in i3c_master_register"), while 990c149c61ee
("i3c: master: Introduce optional Runtime PM support") added the
i3c_master_rpm_get() call before device_initialize().

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261108092920.314161-1-vulab@iscas.ac.cn?part=1

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

  reply	other threads:[~2026-11-08  9:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-08  9:29 [PATCH v2] i3c: master: Fix fwnode reference leak in i3c_master_register_fwnode() Wentao Liang
2026-11-08  9:29 ` Wentao Liang
2026-11-08  9:41 ` sashiko-bot [this message]
2026-11-11 19:31 ` Frank Li
2026-11-11 19:31   ` Frank Li

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-203661@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --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.