linux/drivers/nvme/host
Breno Leitao 5a526388d0 nvme/host: Fix RCU list traversal to use SRCU primitive
[ Upstream commit 6d1c69945c ]

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: be647e2c76 ("nvme: use srcu for iterating namespace list")
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-11-17 15:08:57 +01:00
..
apple.c nvme-apple: return directly instead of else 2023-04-13 08:55:06 +02:00
auth.c nvme-auth: set explanation code for failure2 msgs 2023-12-20 17:01:57 +01:00
constants.c nvme fixes for Linux 6.5 2023-06-30 14:04:08 -06:00
core.c nvme/host: Fix RCU list traversal to use SRCU primitive 2024-11-17 15:08:57 +01:00
fabrics.c nvme: blank out authentication fabrics options if not configured 2023-12-03 07:33:06 +01:00
fabrics.h nvme: fix reconnection fail due to reserved tag allocation 2024-03-26 18:20:09 -04:00
fault_inject.c nvme: fix parameter check in nvme_fault_inject_init() 2023-07-12 08:48:33 -07:00
fc.c nvme-fc: do not wait in vain when unloading module 2024-03-01 13:34:52 +01:00
fc.h nvme-fc: Update header and host for common definitions for LS handling 2020-05-09 16:18:33 -06:00
hwmon.c nvme: host: hwmon: constify pointers to hwmon_channel_info 2023-08-21 12:54:02 -07:00
ioctl.c nvme: use srcu for iterating namespace list 2024-08-29 17:33:41 +02:00
Kconfig nvme-auth: Diffie-Hellman key exchange support 2022-08-02 17:14:49 -06:00
Makefile SCSI misc on 20230629 2023-06-30 11:57:07 -07:00
multipath.c nvme-multipath: defer partition scanning 2024-11-17 15:08:57 +01:00
nvme.h nvme-multipath: defer partition scanning 2024-11-17 15:08:57 +01:00
pci.c nvme-pci: fix race condition between reset and nvme_dev_disable() 2024-11-01 01:58:25 +01:00
pr.c nvme: fix nvme_pr_* status code parsing 2024-06-21 14:38:29 +02:00
rdma.c nvme: ensure reset state check ordering 2024-01-20 11:51:41 +01:00
sysfs.c nvme: warn only once for legacy uuid attribute 2023-07-12 08:48:19 -07:00
tcp.c nvme: tcp: avoid race between queue_lock lock and destroy 2024-11-17 15:08:56 +01:00
trace.c nvme: implement In-Band authentication 2022-08-02 17:14:49 -06:00
trace.h nvme: fix async event trace event 2023-04-13 08:59:04 +02:00
zns.c scsi: nvme: zns: Set zone limits before revalidating zones 2023-07-05 21:58:10 -04:00