[ewg] RE: IB/ipoib: ipoib_send: improper call to skb_orphan() in error path

Eli Cohen eli at mellanox.co.il
Sat Feb 9 13:34:51 PST 2008


Thanks, I'll fix this for rc5. 

-----Original Message-----
From: Hoang-Nam Nguyen [mailto:hnguyen at linux.vnet.ibm.com] 
Sent: ו 08 פברואר 2008 23:41
To: Eli Cohen
Cc: ewg at lists.openfabrics.org
Subject: IB/ipoib: ipoib_send: improper call to skb_orphan() in error path

Hello Eli!
Another comment on ipoib_send (ofed-1.3-rc4):

	if (unlikely(post_send(priv, priv->tx_head & (ipoib_sendq_size - 1),
			       address->ah, qpn,
			       tx_req, phead, hlen))) {
		ipoib_warn(priv, "post_send failed\n");
		++dev->stats.tx_errors;
		ipoib_dma_unmap_tx(priv->ca, tx_req);
		dev_kfree_skb_any(skb);
# should return be here?
# otherwise skb_orphan() will be called below
	} else {
		dev->trans_start = jiffies;

		address->last_send = priv->tx_head;
		++priv->tx_head;

		if (++priv->tx_outstanding == (ipoib_sendq_size - 1)) {
			ipoib_dbg(priv, "TX ring full, stopping kernel net queue\n");
			netif_stop_queue(dev);
		}
	}

	if (unlikely(priv->tx_outstanding > MAX_SEND_CQE + 1))
		poll_tx(priv);

	skb_orphan(skb);

Regards
Nam




More information about the ewg mailing list