RDMA/iwcm: Don't access a cm_id after dropping reference
authorSteve Wise <swise@opengridcomputing.com>
Tue, 4 Mar 2008 22:44:52 +0000 (16:44 -0600)
committerRoland Dreier <rolandd@cisco.com>
Tue, 11 Mar 2008 04:22:22 +0000 (21:22 -0700)
cm_work_handler() can access cm_id_priv after it drops its reference
by calling iwch_deref_id(), which might cause it to be freed.  The fix
is to look at whether IWCM_F_CALLBACK_DESTROY is set _before_ dropping
the reference.  Then if it was set, free the cm_id on this thread.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

No differences found