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:   Tue, 15 Aug 2023 18:58:10 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        Kent Gibson <warthog618@...il.com>, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH 2/2] gpio: sim: simplify code with cleanup helpers

On Tue, Aug 15, 2023 at 05:52:53PM +0200, Peter Zijlstra wrote:
> On Tue, Aug 15, 2023 at 10:04:32AM +0200, Linus Walleij wrote:
> > On Wed, Aug 9, 2023 at 3:14 PM Bartosz Golaszewski <brgl@...ev.pl> wrote:


> > > -       mutex_lock(&chip->lock);
> > > +       guard(mutex)(&chip->lock);

> Looks about right.

Btw, why don't we have something like

	guard_mutex()

to be used as

	guard_mutex(&chip->lock);

Moreover, maybe some macro that can predict the API call from the type of
the parameter?

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ