Replying again, due to mail formatting issue: > -----Original Message----- > From: Chuck Lever [mailto:chuck.le...@oracle.com] > Sent: Thursday, July 17, 2014 8:36 PM > To: Steve Wise > Cc: Devesh Sharma; Roland Dreier; Hefty, Sean; linux-rdma@vger.kernel.org > Subject: Re: [for-next 1/2] xprtrdma: take reference of rdma provider > module > > > On Jul 17, 2014, at 11:01 AM, Steve Wise <sw...@opengridcomputing.com> > wrote: > > > > > > > On 7/17/2014 9:01 AM, Devesh Sharma wrote: > >> If verndor driver is attempted for removal while xprtrdma still has > >> an active mount, the removal of driver may never complete and can > >> cause unseen races or in worst case system crash. > >> > >> To solve this, xprtrdma module should get reference of struct > >> ib_device structure for every mount. Reference is taken after local > >> device address resolution is completed successfuly. > >> > >> reference to the struct ib_device pointer is put just before cm_id > destruction. > >> > >> Signed-off-by: Devesh Sharma <devesh.sha...@emulex.com> > > > > This seems like an issue with the rdma-cm or rdma core, not xprtrdma. > > Good point. I was wondering if svcrdma might have a similar issue. > > Infrequently I see a hang during shutdown that appears to be related to the > ordering of removal of one of the RDMA modules, but I've never had time to > chase it. > > See also: https://bugzilla.linux-nfs.org/show_bug.cgi?id=252 > > > > I see that user rdma applications cause a ref on the provider module here > in ib_uverbs_open(): > > > > if (!try_module_get(dev->ib_dev->owner)) { > > ret = -ENODEV; > > goto err; > > > > > > Maybe kernel applications that allocate device resources should cause a ref > on the provider's module.
Yes, To me it looks like the right place to get reference of provider driver is rdma_resolve_addr()-->acuire_ib_dev(). However this patch provides a workaround. Let's wait for Roland/Sean's input. > > > > Sean/Roland, is there some history here as to how rdma provider module > removal should be handled? > > > > Steve. > > -- > Chuck Lever > chuck[dot]lever[at]oracle[dot]com > > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html