On Thu, Oct 24, 2019 at 10:17:43AM -0300, Jason Gunthorpe wrote: > On Tue, Oct 15, 2019 at 11:07:33AM +0300, Leon Romanovsky wrote: > > > diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c > > index 81dbd5f41bed..a3507b8be569 100644 > > +++ b/drivers/infiniband/core/netlink.c > > @@ -42,9 +42,12 @@ > > #include <linux/module.h> > > #include "core_priv.h" > > > > -static DEFINE_MUTEX(rdma_nl_mutex); > > static struct { > > - const struct rdma_nl_cbs *cb_table; > > + const struct rdma_nl_cbs __rcu *cb_table; > > + /* Synchronizes between ongoing netlink commands and netlink client > > + * unregistration. > > + */ > > + struct srcu_struct unreg_srcu; > > A srcu in every index is serious overkill for this. Lets just us a > rwsem: I liked previous variant more than rwsem, but it is Parav's patch. Thanks