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  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 16 May 2020 11:50:45 +0200
From:   Linus Walleij <>
To:     Bartosz Golaszewski <>
Cc:     Srinivas Kandagatla <>,
        Khouloud Touil <>,
        Geert Uytterhoeven <>,
        "open list:GPIO SUBSYSTEM" <>,
        "" <>,
        Bartosz Golaszewski <>
Subject: Re: [PATCH 2/3] gpiolib: use kref in gpio_desc

On Thu, May 14, 2020 at 3:42 PM Bartosz Golaszewski <> wrote:

> So this "numbing down" of the chip works - in that I don't see any
> splat in the above use-case but right now if nvmem takes an existing
> GPIO descriptor over nvmem_config, then it will call gpiod_put() on it
> and we'll do the same in the provider driver leading to the following
> warning:

Isn't that the WARN_ON(extra_checks) in gpiod_free()?
What part of the if() clause is causing this? I.e.:
if (desc && desc->gdev && gpiod_free_commit(desc)) ...

I suspect gpiod_free_commit() is causing it by returning nonzero.
We could essentially ignore that if and only if the gpio_chip
has been detached from the gpio_device.

This should fix the problem if I'm right.

Linus Walleij

Powered by blists - more mailing lists