[ofa-general] crash in ipoib

Michael S. Tsirkin mst at dev.mellanox.co.il
Thu Jun 14 13:20:07 PDT 2007


> Quoting Sean Hefty <mshefty at ichips.intel.com>:
> Subject: Re: [ofa-general] crash in ipoib
> 
> >And here's a version with error handling fixed.
> >Sean, does this solve your crash?
> 
> We'll test a patch once we can agree on it.  It can take up to a day for 
> us to hit this issue though.
> 
> We had created the following to try, which leaves the error handling the 
> same.  Which approach do you prefer?
> 
> @@ -291,16 +291,17 @@ static int ipoib_cm_req_handler(struct ib_cm_id
>         if (ret)
>                 goto err_modify;
> 
> +       cm_id->context = p;
> +       spin_lock_irq(&priv->lock);
>         ret = ipoib_cm_send_rep(dev, cm_id, p->qp,
> 				&event->param.req_rcvd, psn);
>         if (ret) {
> +               spin_unlock_irq(&priv->lock);
>                 ipoib_warn(priv, "failed to send REP: %d\n", ret);
>                 goto err_rep;
>         }
> 
> -       cm_id->context = p;
>         p->jiffies = jiffies;
>         p->state = IPOIB_CM_RX_LIVE;
> -       spin_lock_irq(&priv->lock);
>         if (list_empty(&priv->cm.passive_ids))
>                 queue_delayed_work(ipoib_workqueue,
>                                    &priv->cm.stale_task,
> 				   IPOIB_CM_RX_DELAY);
> 

I think my patch is more correct, but just for the sake of testing
yours should be sufficient as well.

-- 
MST



More information about the general mailing list