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] [thread-next>] [day] [month] [year] [list]
Message-ID: <e6055714-d6da-3dac-8776-281602ffb099@linux.dev>
Date:   Sun, 18 Sep 2022 19:37:25 +0800
From:   Guoqing Jiang <guoqing.jiang@...ux.dev>
To:     Yu Kuai <yukuai1@...weicloud.com>, song@...nel.org,
        logang@...tatee.com, pmenzel@...gen.mpg.de
Cc:     linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org,
        yukuai3@...wei.com, yi.zhang@...wei.com
Subject: Re: [PATCH v3 4/5] md/raid10: fix improper BUG_ON() in
 raise_barrier()



On 9/16/22 7:34 PM, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@...wei.com>
>
> 'conf->barrier' is protected by 'conf->resync_lock', reading
> 'conf->barrier' without holding the lock is wrong.
>
> Signed-off-by: Yu Kuai <yukuai3@...wei.com>
> ---
>   drivers/md/raid10.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
> index cf452c25e1e5..9a28abd19709 100644
> --- a/drivers/md/raid10.c
> +++ b/drivers/md/raid10.c
> @@ -936,8 +936,8 @@ static void flush_pending_writes(struct r10conf *conf)
>   
>   static void raise_barrier(struct r10conf *conf, int force)
>   {
> -	BUG_ON(force && !conf->barrier);
>   	spin_lock_irq(&conf->resync_lock);
> +	BUG_ON(force && !conf->barrier);
>   
>   	/* Wait until no block IO is waiting (unless 'force') */
>   	wait_event_lock_irq(conf->wait_barrier, force || !conf->nr_waiting,

Acked-by: Guoqing Jiang <guoqing.jiang@...ux.dev>

Thanks,
Guoqing

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ