[ewg] IB/ipoib: ipoib_send: improper call to skb_orphan() in error path
Hoang-Nam Nguyen
hnguyen at linux.vnet.ibm.com
Fri Feb 8 13:41:12 PST 2008
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