[ofa-general] Re: [PATCH] - [resend] Corrects a race in ipoib_cm_post_receive_nonsrq()
Hoang-Nam Nguyen
HNGUYEN at de.ibm.com
Wed Jul 30 06:05:53 PDT 2008
Hi,
Sorry for this very late finding as I was "blind" at the first review
some weeks ago.
> +static void ipoib_cm_init_rx_wr(struct net_device *dev,
> + struct ib_recv_wr *wr,
> + struct ib_sge *sge)
> +{
> + struct ipoib_dev_priv *priv = netdev_priv(dev);
> + int i;
> +
> + for (i = 0; i < priv->cm.num_frags; ++i)
> + sge[i].lkey = priv->mr->lkey;
> +
> + sge[0].length = IPOIB_CM_HEAD_SIZE;
> + for (i = 1; i < priv->cm.num_frags; ++i)
> + sge[i].length = PAGE_SIZE;
> +
> + wr->next = NULL;
> + wr->sg_list = priv->cm.rx_sge;
This should actually be set to sge as provided by the caller.
Will send a patch to fix this for 2.6.27 soon.
> + wr->num_sge = priv->cm.num_frags;
> +}
Thanks
Nam
More information about the general
mailing list