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: <CAMRc=Mfv=kgk0mdT5aVmB9VmhCBvyjr3zq2Xdrk0QY9T53ybjQ@mail.gmail.com>
Date:   Mon, 27 Nov 2023 20:44:35 +0100
From:   Bartosz Golaszewski <brgl@...ev.pl>
To:     Kent Gibson <warthog618@...il.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Andy Shevchenko <andy@...nel.org>, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gpiolib: Drop cargo-culted comment

On Sun, Nov 26, 2023 at 1:14 AM Kent Gibson <warthog618@...il.com> wrote:
>
> On Sun, Nov 26, 2023 at 12:05:08AM +0100, Linus Walleij wrote:
> > On Sat, Nov 25, 2023 at 3:40 AM Kent Gibson <warthog618@...il.com> wrote:
> > > On Sat, Nov 25, 2023 at 12:25:47AM +0100, Linus Walleij wrote:
> >
> > > > -/* gpio_lock prevents conflicts during gpio_desc[] table updates.
> > > > - * While any GPIO is requested, its gpio_chip is not removable;
> > > > - * each GPIO's "requested" flag serves as a lock and refcount.
> > > > - */
> > >
> > > Perhaps provide a comment as to what the gpio_lock DOES cover?
> >
> > Normally yes, but Bartosz just said he is going to replace this spinlock
> > with a mutex so it's better if he adds it then.
> >
>
> If that is happening soon then leave it to Bart to change both the
> comment and lock.
>
> If not, then we now have an undocumented lock.  If the coverage of the
> spinlock and proposed mutex are the same why not describe what the lock
> covers now?  Then Bart wont have to update the comment.
>
> Cheers,
> Kent.
>

Yeah, I think we should maybe leave some temporary FIXME comment once
the mutex patch is in saying this must go as well but it'll take more
time because the problem is quite tricky.

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ