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:   Tue, 26 Jul 2022 09:14:09 +0800
From:   Zhihao Cheng <>
To:     Jan Kara <>
CC:     Ted Tso <>, <>,
        Ritesh Harjani <>,
Subject: Re: [PATCH 05/10] ext4: Fix race when reusing xattr blocks

在 2022/7/25 23:23, Jan Kara 写道:

>> So far, we have mb_cache_entry_delete_or_get() and
>> mb_cache_entry_wait_unused(), so used cache entry cannot be concurrently
>> removed. Removing check 'hlist_bl_unhashed(&ce->e_hash_list)' is okay.
>> What's affect of changing the other two checks 'ref >=
>> EXT4_XATTR_REFCOUNT_MAX' and '!ce->e_reusable'? To make code more obvious?
>> eg. To point out the condition of 'ref <= EXT4_XATTR_REFCOUNT_MAX' rather
>> than 'ce->e_reusable', we have checked 'ce->e_reusable' in
>> ext4_xattr_block_cache_find() before?
> Well, ce->e_reusable is set if and only if BHDR(new_bh)->h_refcount <
> EXT4_XATTR_REFCOUNT_MAX. So checking whether the refcount is small enough
> is all that is needed and we don't need the ce->e_reusable check here.

Thanks for replying, I get it, thanks.

Powered by blists - more mailing lists