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: <20201125104629.GE25562@amd>
Date:   Wed, 25 Nov 2020 11:46:29 +0100
From:   Pavel Machek <pavel@....cz>
To:     Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc:     Dan Carpenter <dan.carpenter@...cle.com>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        dmurphy@...com, jacek.anaszewski@...il.com,
        linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] leds: lp50xx: Fix an error handling path in
 'lp50xx_probe_dt()'

Hi!

> > > > I have been trying to teach Smatch to understand reference counting so
> > > > it can discover these kinds of bugs automatically.
> > > > 
> > > > I don't know how software_node_get_next_child() can work when it doesn't
> > > > call kobject_get().  This sort of bug would have been caught in testing
> > > > because it affects the success path so I must be reading the code wrong.
> > > > 
> > > 
> > > I had the same reading of the code and thought that I was missing something
> > > somewhere.
> > > 
> > > There is the same question about 'acpi_get_next_subnode' which is also a
> > > '.get_next_child_node' function, without any ref counting, if I'm correct.
> > > 
> > 
> > Yeah, but there aren't any ->get/put() ops for the acpi_get_next_subnode()
> > stuff so it's not a problem.  (Presumably there is some other sort of
> > refcounting policy there).
> 
> OK, so I guess we need to make software_node_get_next_child()
> mimic the behaviour of of_get_next_available_child(), and not
> acpi_get_next_subnode(). Does the attached patch work?

Does not sound unreasonable. Did it get solved, somehow?

Best regards,
								Pavel

-- 
http://www.livejournal.com/~pavelmachek

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ