Skip to content
Commit 5dd18f09 authored by Breno Leitao's avatar Breno Leitao Committed by Keith Busch
Browse files

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: default avatarBreno Leitao <leitao@debian.org>
Fixes: be647e2c ("nvme: use srcu for iterating namespace list")
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent a3f143c4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment