aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/iwcm.h
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2016-07-29 11:00:54 -0700
committerDoug Ledford <dledford@redhat.com>2016-08-02 13:15:18 -0400
commit59c68ac31e15ad09d2cb04734e3c8c544a95f8d4 (patch)
tree762e01018c61bcbf000303b4929f71b0d10c83d3 /drivers/infiniband/core/iwcm.h
parentiw_cxgb4: don't block in destroy_qp awaiting the last deref (diff)
downloadlinux-dev-59c68ac31e15ad09d2cb04734e3c8c544a95f8d4.tar.xz
linux-dev-59c68ac31e15ad09d2cb04734e3c8c544a95f8d4.zip
iw_cm: free cm_id resources on the last deref
Remove the complicated logic to free the iw_cm_id inside iw_cm event handlers vs when an application thread destroys the cm_id. Also remove the block in iw_destroy_cm_id() to block the application until all references are removed. This block can cause a deadlock when disconnecting or destroying cm_ids inside an rdma_cm event handler. Simply allowing the last deref of the iw_cm_id to free the memory is cleaner and avoids this potential deadlock. Also a flag is added, IW_CM_DROP_EVENTS, that is set when the cm_id is marked for destruction. If any events are pending on this iw_cm_id, then as they are processed they will be dropped vs posted upstream if IW_CM_DROP_EVENTS is set. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/iwcm.h')
-rw-r--r--drivers/infiniband/core/iwcm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/iwcm.h b/drivers/infiniband/core/iwcm.h
index 3f6cc82564c8..82c2cd1b0a80 100644
--- a/drivers/infiniband/core/iwcm.h
+++ b/drivers/infiniband/core/iwcm.h
@@ -56,7 +56,7 @@ struct iwcm_id_private {
struct list_head work_free_list;
};
-#define IWCM_F_CALLBACK_DESTROY 1
+#define IWCM_F_DROP_EVENTS 1
#define IWCM_F_CONNECT_WAIT 2
#endif /* IWCM_H */