On Wed, Sep 15, 2021 at 02:34:19PM +0800, Mark Zhang wrote: > > - case RDMA_CM_LISTEN: > > - if (cma_any_addr(cma_src_addr(id_priv)) && !id_priv->cma_dev) > > - cma_cancel_listens(id_priv); > > - break; > > If this case is removed, is this code path still good? > > cma_add_one/cma_remove_one > cma_process_remove > cma_send_device_removal_put > cma_cancel_operation Yes, it is complicated, but the cma_process_remove() won't proceed past cma_dev_put() until all the ULPs have gone through _destroy_id() So all this does is move the reaping of the listens to the destroy_id time Jason