This patch adds a check to see if a mad_recv_wc exists before a call is made to free it. This fixes a crash after a call is made to ib_cm_establish.
Signed-off-by: Sean Hefty <[EMAIL PROTECTED]> Index: infiniband/core/cm.c =================================================================== --- infiniband/core/cm.c (revision 1809) +++ infiniband/core/cm.c (working copy) @@ -579,7 +579,8 @@ static struct cm_work * cm_dequeue_work( static void cm_free_work(struct cm_work *work) { - ib_free_recv_mad(work->mad_recv_wc); + if (work->mad_recv_wc) + ib_free_recv_mad(work->mad_recv_wc); kfree(work); } @@ -2528,6 +2529,7 @@ int ib_cm_establish(struct ib_cm_id *cm_ INIT_WORK(&work->work, cm_work_handler, work); work->local_id = cm_id->local_id; work->remote_id = cm_id->remote_id; + work->mad_recv_wc = NULL; work->cm_event.event = IB_CM_USER_ESTABLISHED; queue_work(cm.wq, &work->work); out: _______________________________________________ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general