[ofa-general] Re: [RFC][PATCH] last recv race patch

Roland Dreier rdreier at cisco.com
Wed Jun 25 15:11:18 PDT 2008


Did I miss it or did you ever explain to me what the race here is?

 > Address a possible race

 > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
 > index 97e67d3..0886ee7 100644
 > --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
 > +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
 > @@ -559,9 +559,12 @@ void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
 >             else {
 >                   if (!--p->recv_count) {
 >                         spin_lock_irqsave(&priv->lock, flags);
 > -                       list_move(&p->list, &priv->cm.rx_reap_list);
 > -                       spin_unlock_irqrestore(&priv->lock, flags);
 > -                       queue_work(ipoib_workqueue, &priv->cm.rx_reap_task);
 > +                       if (p->state == IPOIB_CM_RX_LIVE) {
 > +                             list_move(&p->list, &priv->cm.rx_reap_list);
 > +                             spin_unlock_irqrestore(&priv->lock, flags);
 > +                             queue_work(ipoib_workqueue, &priv->cm.rx_reap_task);
 > +                       } else
 > +                             spin_unlock_irqrestore(&priv->lock, flags);



More information about the general mailing list