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: Tue, 27 Feb 2024 14:28:00 -0800
From: Song Liu <song@...nel.org>
To: Yu Kuai <yukuai1@...weicloud.com>
Cc: Gui-Dong Han <2045gemini@...il.com>, linux-raid@...r.kernel.org, 
	linux-kernel@...r.kernel.org, baijiaju1990@...look.com, 
	stable@...r.kernel.org, "yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH v4] md/raid5: fix atomicity violation in raid5_cache_count

On Thu, Feb 1, 2024 at 11:11 PM Yu Kuai <yukuai1@...weicloud.com> wrote:
>
> Hi,
>
> 在 2024/01/30 15:37, Song Liu 写道:
> > On Thu, Jan 11, 2024 at 11:10 PM Gui-Dong Han <2045gemini@...ilcom> wrote:
> >>
> > [...]
> >>
> >>          raid5_release_stripe(sh);
> >> -       conf->max_nr_stripes++;
> >> +       WRITE_ONCE(conf->max_nr_stripes, conf->max_nr_stripes + 1);
> >
> > This is weird. We are reading max_nr_stripes without READ_ONCE.
>
> We don't need READ_ONCE() here because writers are protected by
> 'cache_size_mutex', there are no concurrent writers, it's safe to
> read 'max_nr_stripes' directly.

OK, that makes sense. Applied to md-6.9.

Thanks,
Song

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ