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: <6caf6fa4-15e5-a7ec-cec4-69e5ad70c090@kernel.dk>
Date:   Mon, 10 Dec 2018 14:44:39 -0700
From:   Jens Axboe <axboe@...nel.dk>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Johannes Thumshirn <jthumshirn@...e.de>,
        Hannes Reinecke <hare@...e.de>,
        Bart Van Assche <bvanassche@....org>,
        Matthew Wilcox <willy@...radead.org>,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtip32xx: avoid using semaphores

On 12/10/18 2:34 PM, Arnd Bergmann wrote:
> The "cmd_slot_unal" semaphore is never used in a blocking way
> but only as an atomic counter. Change the code to using
> atomic_dec_if_positive() as a better API.

Looks good to me. We should also convert the return to blk-mq
when we hit failure here to BLK_STS_DEV_RESOURCE, but that's
a separate patch.

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ