From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: 林妙倩 <linmq006@gmail.com>
Cc: "Viresh Kumar" <vireshk@kernel.org>,
"Vinod Koul" <vkoul@kernel.org>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] dmaengine: dw: dmamux: Fix device reference leak in rzn1_dmamux_route_allocate
Date: Tue, 2 Sep 2025 14:02:01 +0300 [thread overview]
Message-ID: <aLbOqbuIVWhq4UtL@smile.fi.intel.com> (raw)
In-Reply-To: <CAH-r-ZHx+vcL3QY0rKP3Lo_qofYLSuxCxqyb=URPSbnStxA5cQ@mail.gmail.com>
On Tue, Sep 02, 2025 at 06:18:18PM +0800, 林妙倩 wrote:
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> 于2025年9月2日周二 17:37写道:
> > On Tue, Sep 02, 2025 at 05:03:58PM +0800, Miaoqian Lin wrote:
> > > The reference taken by of_find_device_by_node()
> > > must be released when not needed anymore.
> > > Add missing put_device() call to fix device reference leaks.
> >
> > How is this being found? Do you have a stacktrace or kmemleak reports?
>
> This was found through static code analysis.
> The of_find_device_by_node() documentation states that it
> "takes a reference to the embedded struct device which needs to be
> dropped after use."
>
> I cross-referenced other of_find_device_by_node() usage patterns to
> check the correct usage,
> then audited this code and found the problem.
You should summarise that in the commit message. But since it's already applied
it's for the future and up to Vinos if he wants this to be updated.
> I don't have a stacktrace or kmemleak reports.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-09-02 11:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 9:03 [PATCH] dmaengine: dw: dmamux: Fix device reference leak in rzn1_dmamux_route_allocate Miaoqian Lin
2025-09-02 9:18 ` Miquel Raynal
2025-09-02 9:24 ` Markus Elfring
2025-09-02 9:35 ` Vinod Koul
2025-09-02 9:37 ` Andy Shevchenko
2025-09-02 10:18 ` 林妙倩
2025-09-02 11:02 ` Andy Shevchenko [this message]
2025-09-02 13:12 ` 林妙倩
2025-09-02 13:30 ` Markus Elfring
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=aLbOqbuIVWhq4UtL@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linmq006@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=stable@vger.kernel.org \
--cc=vireshk@kernel.org \
--cc=vkoul@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox