lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YUsquTRvuf0UdtkN@google.com>
Date:   Wed, 22 Sep 2021 14:08:09 +0100
From:   Lee Jones <lee.jones@...aro.org>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
Cc:     Samuel Ortiz <sameo@...ux.intel.com>, linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH] mfd: Add missing of_node_put for loop iteration

On Wed, 22 Sep 2021, Krzysztof Kozlowski wrote:

> On 28/05/2021 13:51, Krzysztof Kozlowski wrote:
> > Early exits from for_each_child_of_node() should decrement the
> > node reference counter.  Reported by Coccinelle:
> > 
> >   drivers/mfd/mfd-core.c:197:2-24: WARNING:
> >     Function "for_each_child_of_node" should have of_node_put() before goto around lines 209.
> > 
> > Fixes: c94bb233a9fe ("mfd: Make MFD core code Device Tree and IRQ domain aware")
> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
> > ---
> >  drivers/mfd/mfd-core.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
> > index 79f5c6a18815..684a011a6396 100644
> > --- a/drivers/mfd/mfd-core.c
> > +++ b/drivers/mfd/mfd-core.c
> > @@ -198,6 +198,7 @@ static int mfd_add_device(struct device *parent, int id,
> >  			if (of_device_is_compatible(np, cell->of_compatible)) {
> >  				/* Ignore 'disabled' devices error free */
> >  				if (!of_device_is_available(np)) {
> > +					of_node_put(np);
> >  					ret = 0;
> >  					goto fail_alias;
> >  				}
> > @@ -205,6 +206,7 @@ static int mfd_add_device(struct device *parent, int id,
> >  				ret = mfd_match_of_node_to_dev(pdev, np, cell);
> >  				if (ret == -EAGAIN)
> >  					continue;
> > +				of_node_put(np);
> >  				if (ret)
> >  					goto fail_alias;
> >  
> > 
> 
> Dear Lee,
> 
> This was already a resend. Any comments from your side?

Looks like the last batch was RFC.

These all slipped through the net.

Back on my review pile, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ