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: <20180706170452.xw3w56dgtj4j4tru@earth.universe>
Date:   Fri, 6 Jul 2018 19:04:52 +0200
From:   Sebastian Reichel <sebastian.reichel@...labora.co.uk>
To:     Alexey Khoroshilov <khoroshilov@...ras.ru>
Cc:     Mike Looijmans <mike.looijmans@...ic.nl>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, ldv-project@...uxtesting.org,
        Julia Lawall <julia.lawall@...6.fr>, sil2review@...ts.osadl.org
Subject: Re: [PATCH] power: supply: ltc2941-battery-gauge: Release
 device_node in ltc294x_i2c_probe()

Hi,

On Tue, May 08, 2018 at 10:16:31PM +0300, Alexey Khoroshilov wrote:
> On 01.05.2018 15:39, Sebastian Reichel wrote:
> > On Sun, Apr 29, 2018 at 01:35:55AM +0300, Alexey Khoroshilov wrote:
> >> There is of_node_get(client->dev.of_node) in ltc294x_i2c_probe(),
> >> but these is no of_node_put() somethere in the driver.
> >>
> >> The patch adds one on error and normal paths.
> >>
> >> Found by Linux Driver Verification project (linuxtesting.org).
> >>
> >> Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>
> > 
> > That is ugly. Let's replace of_property_read_u32(np, ...) with
> > device_property_read_u32(dev, ...) and get rid of np instead.
> 
> Ok, I will prepare v2.
> 
> What is the right way to replace
> info->supply_desc.name = np->name;
> ?
> 
> If lifetime of 'client->dev.of_node' = 'np' cannot be less than lifetime
> of 'client->dev', should we use just
> info->supply_desc.name = client->dev.of_node->name;
> ?

It looks like I never responsed to this, sorry for the delay.
Your suggestion looks fine.

-- Sebastian

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ