[PATCH] netpoll: retry memory leak
From: Stephen Hemminger
Date: Wed Oct 18 2006 - 15:39:08 EST
If netpoll uses up it's retries, it should drop the skb
not leak memory.
Signed-off-by: Stephen Hemminger <shemminger@xxxxxxxx>
---
net/core/netpoll.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index ead5920..c375fde 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -273,10 +273,8 @@ static void netpoll_send_skb(struct netp
int status;
struct netpoll_info *npinfo;
- if (!np || !np->dev || !netif_running(np->dev)) {
- __kfree_skb(skb);
- return;
- }
+ if (!np || !np->dev || !netif_running(np->dev))
+ goto free_skb;
npinfo = np->dev->npinfo;
@@ -314,6 +312,8 @@ static void netpoll_send_skb(struct netp
netpoll_poll(np);
udelay(50);
} while (npinfo->tries > 0);
+free_skb:
+ __kfree_skb(skb);
}
void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
--
1.4.2.3
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/