diff options
| author | Breno Leitao <[email protected]> | 2024-11-04 12:24:40 +0000 |
|---|---|---|
| committer | Keith Busch <[email protected]> | 2024-11-04 21:25:41 +0000 |
| commit | 6d1c69945ce63a9fba22a4abf646cf960d878782 (patch) | |
| tree | b7f5f421d77b70ed58d9674244c79a8124268c52 /rust/helpers/helpers.c | |
| parent | Merge tag 'nvme-6.12-2024-10-31' of git://git.infradead.org/nvme into block-6.12 (diff) | |
| download | kernel-6d1c69945ce63a9fba22a4abf646cf960d878782.tar.gz kernel-6d1c69945ce63a9fba22a4abf646cf960d878782.zip | |
nvme/host: 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/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.
Fixes: be647e2c76b2 ("nvme: use srcu for iterating namespace list")
Signed-off-by: Breno Leitao <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions
