On Mon, Dec 03, 2018 at 09:37:00AM -0600, Steve Wise wrote: > > > On 11/30/2018 2:52 PM, Jason Gunthorpe wrote: > > > > This is OK > > > > I was thinking about the unload problem, and I wonder if the simple > > solution is to add something like ib_unregister_fence() which only > > returns once the device is unregistered and internaly waits for any > > other parrallel unregisters that may be running. Not sure the locking > > for that would be any fun though.. > > > > Jason > > Can you expand on your thinking here? I'm not following. I'd have to really dig into it, I think. I'm looking at this and thinking the siw has the same bug classes, so maybe the core code should handle this simply somehow. Probably the list of rxe devices shouldn't even exist, and the core should have some helpers like 'unregsiter all devices of driver RXE' and 'find device of driver RXE' and then manage all this tricky locking internally That would be best, but I'm not really sure the exact details without trying to write it myself.. Jason