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-next>] [day] [month] [year] [list]
Message-ID: <20200813073115.GA15436@infradead.org>
Date:   Thu, 13 Aug 2020 08:31:15 +0100
From:   Christoph Hellwig <hch@...radead.org>
To:     Jacob Wen <jian.w.wen@...cle.com>
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] block: insert a general SMP memory barrier before
 wake_up_bit()

On Thu, Aug 13, 2020 at 10:44:38AM +0800, Jacob Wen wrote:
> wake_up_bit() uses waitqueue_active() that needs the explicit smp_mb().

Sounds like the barrier should go into wake_up_bit then..

> 
> Signed-off-by: Jacob Wen <jian.w.wen@...cle.com>
> ---
>  fs/block_dev.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/block_dev.c b/fs/block_dev.c
> index 0ae656e022fd..e74980848a2a 100644
> --- a/fs/block_dev.c
> +++ b/fs/block_dev.c
> @@ -1175,6 +1175,7 @@ static void bd_clear_claiming(struct block_device *whole, void *holder)
>  	/* tell others that we're done */
>  	BUG_ON(whole->bd_claiming != holder);
>  	whole->bd_claiming = NULL;
> +	smp_mb();
>  	wake_up_bit(&whole->bd_claiming, 0);
>  }
>  
> -- 
> 2.17.1
> 
---end quoted text---

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ