Skip to content

Commit efbf84b

Browse files
committed
Merge: nvme-multipath: fix suspicious RCU usage warning
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1181 JIRA: https://issues.redhat.com/browse/RHEL-102650 Depends: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1151 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: Julio Faracco <jfaracco@redhat.com>
2 parents 506774b + 3529b9e commit efbf84b

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
@@ -1046,7 +1046,8 @@ void nvme_mpath_add_sysfs_link(struct nvme_ns_head *head)
10461046
*/
10471047
srcu_idx = srcu_read_lock(&head->srcu);
10481048

1049-
list_for_each_entry_rcu(ns, &head->list, siblings) {
1049+
list_for_each_entry_srcu(ns, &head->list, siblings,
1050+
srcu_read_lock_held(&head->srcu)) {
10501051
/*
10511052
* Ensure that ns path disk node is already added otherwise we
10521053
* may get invalid kobj name for target

0 commit comments

Comments
 (0)