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]
Date:   Fri, 24 Mar 2023 09:52:01 +0800
From:   gouhao@...ontech.com
To:     willy@...radead.org
Cc:     brauner@...nel.org, gouhao@...ontech.com,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        viro@...iv.linux.org.uk
Subject: Re: [PATCH] fs/buffer: adjust the order of might_sleep() in __getblk_gfp()

>On Thu, Mar 23, 2023 at 05:37:52PM +0800, gouhao@...ontech.com wrote:
>> From: Gou Hao <gouhao@...ontech.com>
>> 
>> If 'bh' is found in cache, just return directly.
>> might_sleep() is only required on slow paths.
>
>You're missing the point.  The caller can't know whether the slow or
>fast path will be taken.  So it must _never_ call this function if it
>cannot sleep.
I see. Thank you for your explanation! :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ