diff options
| author | Breno Leitao <leitao@debian.org> | 2024-11-05 06:42:46 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-05 14:03:05 +0100 |
| commit | 4eaa19c6205c370b1c055140b68ff77816d8abf3 (patch) | |
| tree | fa7c639032f751715263ce777eb3c108ce3c30d0 /block | |
| parent | 8f95ffb8f86e79e3d44566b8c5a1a925ea639f8c (diff) | |
| download | linux-4eaa19c6205c370b1c055140b68ff77816d8abf3.tar.gz linux-4eaa19c6205c370b1c055140b68ff77816d8abf3.tar.bz2 linux-4eaa19c6205c370b1c055140b68ff77816d8abf3.zip | |
nvme/multipath: Fix RCU list traversal to use SRCU primitive
[ Upstream commit 5dd18f09ce7399df6fffe80d1598add46c395ae9 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions
