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] [day] [month] [year] [list]
Message-ID: <Y05yu3o+SBL6s51H@google.com>
Date:   Tue, 18 Oct 2022 10:32:43 +0100
From:   Lee Jones <lee@...nel.org>
To:     Sebastian Urban <surban@...ban.net>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mfd: take OF node reference for MFD cell platform device

On Tue, 20 Sep 2022, Lee Jones wrote:

> On Sat, 17 Sep 2022, Sebastian Urban wrote:
> 
> > Properly increase OF node reference count when assigning it to a
> > platform device created for an MFD cell.
> > 
> > Signed-off-by: Sebastian Urban <surban@...ban.net>
> > ---
> >  drivers/mfd/mfd-core.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
> > index 16d1861e9682..8e57f67719cf 100644
> > --- a/drivers/mfd/mfd-core.c
> > +++ b/drivers/mfd/mfd-core.c
> > @@ -161,7 +161,7 @@ static int mfd_match_of_node_to_dev(struct platform_device *pdev,
> >  	of_entry->np = np;
> >  	list_add_tail(&of_entry->list, &mfd_of_node_list);
> >  
> > -	pdev->dev.of_node = np;
> > +	pdev->dev.of_node = of_node_get(np);
> 
> Doesn't this cause an imbalance?
> 
> Or is there already a put somewhere?

I can't accept this until you've answered my queries.

-- 
Lee Jones [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ