Skip to content

Commit 9f6b818

Browse files
committed
Merge: nvme-multipath: fix suspicious RCU usage warning
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7110 JIRA: https://issues.redhat.com/browse/RHEL-102648 A new regression fix appeared upstream for a recently backported nvme change. ``` When I run the NVME over TCP test in virtme-ng, I get the following "suspicious RCU usage" warning in nvme_mpath_add_sysfs_link(): This patch uses sleepable RCU version of helper list_for_each_entry_srcu() instead of list_for_each_entry_rcu() to fix it. Fixes: 4dbd2b2 ("nvme-multipath: Add visibility for round-robin io-policy") ``` Signed-off-by: Chris Leech <cleech@redhat.com> Approved-by: John Meneghini <jmeneghi@redhat.com> Approved-by: bgurney <bgurney@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Augusto Caringi <acaringi@redhat.com>
2 parents 8010469 + 359ec1a commit 9f6b818

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/nvme/host/multipath.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,8 @@ void nvme_mpath_add_sysfs_link(struct nvme_ns_head *head)
10551055
*/
10561056
srcu_idx = srcu_read_lock(&head->srcu);
10571057

1058-
list_for_each_entry_rcu(ns, &head->list, siblings) {
1058+
list_for_each_entry_srcu(ns, &head->list, siblings,
1059+
srcu_read_lock_held(&head->srcu)) {
10591060
/*
10601061
* Ensure that ns path disk node is already added otherwise we
10611062
* may get invalid kobj name for target

0 commit comments

Comments
 (0)