Re: [PATCH 8/8] netfs/fscache: Add a memory barrier for FSCACHE_VOLUME_CREATING

From: David Howells
Date: Thu Oct 10 2024 - 07:24:42 EST


Zizhi Wo <wozizhi@xxxxxxxxxx> wrote:

> In fscache_create_volume(), there is a missing memory barrier between the
> bit-clearing operation and the wake-up operation. This may cause a
> situation where, after a wake-up, the bit-clearing operation hasn't been
> detected yet, leading to an indefinite wait. The triggering process is as
> follows:
> ...
> By combining the clear and wake operations into clear_and_wake_up_bit() to
> fix this issue.
>
> Fixes: bfa22da3ed65 ("fscache: Provide and use cache methods to lookup/create/free a volume")
> Signed-off-by: Zizhi Wo <wozizhi@xxxxxxxxxx>

Acked-by: David Howells <dhowells@xxxxxxxxxx>