diff options
author | Breno Leitao <leitao@debian.org> | 2024-11-05 06:42:46 -0800 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2024-11-18 09:11:24 -0800 |
commit | 5dd18f09ce7399df6fffe80d1598add46c395ae9 (patch) | |
tree | 0b3170c11e3bcf14dd6da6c3b7a23036d8c93d71 /net | |
parent | a3f143c461444c0b56360bbf468615fa814a8372 (diff) | |
download | lwn-5dd18f09ce7399df6fffe80d1598add46c395ae9.tar.gz lwn-5dd18f09ce7399df6fffe80d1598add46c395ae9.zip |
nvme/multipath: Fix RCU list traversal to use SRCU primitive
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/multipath.c:168 RCU-list traversed in non-reader section!!
drivers/nvme/host/multipath.c:227 RCU-list traversed in non-reader section!!
drivers/nvme/host/multipath.c:260 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.
Signed-off-by: Breno Leitao <leitao@debian.org>
Fixes: be647e2c76b2 ("nvme: use srcu for iterating namespace list")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions