[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH-r-ZHL5vSvieYoRp7n-5k3YfG2PSi1=atHg4+261roGOicpA@mail.gmail.com>
Date: Tue, 2 Sep 2025 21:12:51 +0800
From: 林妙倩 <linmq006@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Viresh Kumar <vireshk@...nel.org>, Vinod Koul <vkoul@...nel.org>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH] dmaengine: dw: dmamux: Fix device reference leak in rzn1_dmamux_route_allocate
Andy Shevchenko <andriy.shevchenko@...ux.intel.com> 于2025年9月2日周二 19:03写道:
>
> On Tue, Sep 02, 2025 at 06:18:18PM +0800, 林妙倩 wrote:
> > Andy Shevchenko <andriy.shevchenko@...ux.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.
>
Thank you. I'll include such info in the commit messages for future patches.
> > I don't have a stacktrace or kmemleak reports.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
Powered by blists - more mailing lists