[PATCH] nvme: fix (S)RCU protection of nvme_ns_head list (alternate)
Christoph Hellwig
hch at lst.de
Tue Nov 29 00:39:05 PST 2022
On Wed, Nov 23, 2022 at 05:24:32PM -0700, Caleb Sander wrote:
> +++ b/drivers/nvme/host/multipath.c
> @@ -175,10 +175,12 @@ void nvme_mpath_revalidate_paths(struct nvme_ns *ns)
> sector_t capacity = get_capacity(head->disk);
> int node;
>
> + rcu_read_lock();
> list_for_each_entry_rcu(ns, &head->list, siblings) {
> if (capacity != get_capacity(ns->disk))
> clear_bit(NVME_NS_READY, &ns->flags);
> }
> + rcu_read_unlock();
I can't see how protection iteraction of the same list once with
SRCU and once with RCU can work in practice.
More information about the Linux-nvme
mailing list