Commit 5273d629 authored by Roland Dreier's avatar Roland Dreier Committed by Linus Torvalds

[PATCH] IB/ipoib: fix rx memory leak

Fix memory leak when posting a receive buffer (pointed out by Shirley Ma).
Signed-off-by: default avatarRoland Dreier <roland@topspin.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e4e3c8df
......@@ -137,6 +137,9 @@ static int ipoib_ib_post_receive(struct net_device *dev, int id)
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment