> >    It seems rdma_destroy_id() has the same pattern, but it's not clear
 > >    to me in the code:
 > >    mutex_lock(&lock);
 > >    if (id_priv->cma_dev) {
 > >            mutex_unlock(&lock);
 > >            // why can't the device be hot-unplugged here??
 > 
 > The state of the id has been set to destroying, which will cause the
 > device removal code to ignore the id.  Even if device removal occurs
 > before the id state has been set, this should be safe.  A hot-plug
 > event reports the device removal, but waits for the user to destroy
 > the id. The device is only removed from the id by this function,
 > further down.

Got it -- you still have a cma-internal reference to the device, so
the hot-unplug won't complete, even though you drop the lock.

OK, looks fine to me.

 - R.
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to