Fix memory leak when posting a receive buffer (pointed out by Shirley Ma).

Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>


--- linux-export.orig/drivers/infiniband/ulp/ipoib/ipoib_ib.c   2005-03-02 
20:26:02.919854355 -0800
+++ linux-export/drivers/infiniband/ulp/ipoib/ipoib_ib.c        2005-03-02 
20:26:12.514771621 -0800
@@ -137,6 +137,9 @@
        if (ret) {
                ipoib_warn(priv, "ipoib_ib_receive failed for buf %d (%d)\n",
                           id, ret);
+               dma_unmap_single(priv->ca->dma_device, addr,
+                                IPOIB_BUF_SIZE, DMA_FROM_DEVICE);
+               dev_kfree_skb_any(skb);
                priv->rx_ring[id].skb = NULL;
        }
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to