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]
Message-ID: <Zyk8DTLbDP2LFdDJ@kbusch-mbp.dhcp.thefacebook.com>
Date: Mon, 4 Nov 2024 14:26:37 -0700
From: Keith Busch <kbusch@...nel.org>
To: Christoph Hellwig <hch@....de>
Cc: Breno Leitao <leitao@...ian.org>, Jens Axboe <axboe@...nel.dk>,
	Sagi Grimberg <sagi@...mberg.me>, linux-nvme@...ts.infradead.org,
	linux-kernel@...r.kernel.org, kernel-team@...a.com
Subject: Re: [PATCH] nvme/host: Fix RCU list traversal to use SRCU primitive

On Mon, Nov 04, 2024 at 02:16:52PM +0100, Christoph Hellwig wrote:
> On Mon, Nov 04, 2024 at 04:24:40AM -0800, Breno Leitao wrote:
> > The code currently uses list_for_each_entry_rcu() while holding an SRCU
> > lock, triggering false positive warnings with CONFIG_PROVE_RCU=y
> > enabled:
> > 
> >   drivers/nvme/host/core.c:3770 RCU-list traversed in non-reader section!!
> > 
> > While the list is properly protected by SRCU lock, the code uses the wrong
> > list traversal primitive. Replace list_for_each_entry_rcu() with
> > list_for_each_entry_srcu() to correctly indicate SRCU-based protection
> > and eliminate the false warning.
> 
> I didn't even know there was such as thing as list_for_each_entry_srcu,
> but apparently it's been there for a while.  Looks good:

Neither did I! Thanks Breno, applied to nvme-6.12

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ