[openib-general] [PATCH][6/11] IB/ipoib: fix rx memory leak
Roland Dreier
roland at topspin.com
Wed Mar 2 21:31:22 PST 2005
Fix memory leak when posting a receive buffer (pointed out by Shirley Ma).
Signed-off-by: Roland Dreier <roland at topspin.com>
--- 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;
}
More information about the general
mailing list