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]
Date:   Fri, 30 Nov 2018 10:07:42 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATCH 08/10] regulator: max77686: Let core handle GPIO descriptor

On Wed, Nov 28, 2018 at 4:24 PM Charles Keepax
<ckeepax@...nsource.cirrus.com> wrote:
> On Wed, Nov 28, 2018 at 11:43:48AM +0100, Linus Walleij wrote:

> > @@ -255,8 +255,7 @@ static int max77686_of_parse_cb(struct device_node *np,
(...)
> > +             config->ena_gpiod = gpiod_get_from_of_node(np,
>
> As this is inside the of_parse_cb, it probably needs some thought
> on where the GPIO would need to be freed on which error paths, I
> am not sure it is immediately obvious to me but I suspect it will
> need to be freed in some cases.

I looked it over and came up with a patch making sure that if
the regulator_of_get_init_data() assigns config->ena_gpiod
it gets freed unless handled over to the regulator core.

Thanks for pointing this out, it was a tricky corner case!

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ