[PATCH] spidernet : fix memory leak in spider_net_stop

STALE7160d

5 messages, 4 authors, 2007-02-08 · open the first message on its own page

[PATCH] spidernet : fix memory leak in spider_net_stop

From: Jens Osterkamp <hidden>
Date: 2007-02-01 11:07:47

We forget to call spider_net_free_rx_chain_contents which does the
actual dev_kfree_skb. New skbs are allocated from skbuff_head_cache
on each "ifconfig up" letting the cache grow infinitely.

This patch fixes it.

Signed-off-by: Jens Osterkamp <redacted>

Index: linux-2.6.20-rc6/drivers/net/spider_net.c
===================================================================
--- linux-2.6.20-rc6.orig/drivers/net/spider_net.c
+++ linux-2.6.20-rc6/drivers/net/spider_net.c
@@ -1925,6 +1925,8 @@ spider_net_stop(struct net_device *netde
 	/* release chains */
 	spider_net_release_tx_chain(card, 1);
 
+	spider_net_free_rx_chain_contents(card);
+
 	spider_net_free_chain(card, &card->tx_chain);
 	spider_net_free_chain(card, &card->rx_chain);
 

Re: [PATCH] spidernet : fix memory leak in spider_net_stop

From: Linas Vepstas <hidden>
Date: 2007-02-01 17:36:18

A variant of this patch is queued up for 2.6.21,
as a part of the patch
http://www.mail-archive.com/netdev@vger.kernel.org/msg28213.html

I beleive its in the -mm tree, I have not checked.

--linas

On Thu, Feb 01, 2007 at 12:07:47PM +0100, Jens Osterkamp wrote:
quoted hunk
We forget to call spider_net_free_rx_chain_contents which does the
actual dev_kfree_skb. New skbs are allocated from skbuff_head_cache
on each "ifconfig up" letting the cache grow infinitely.

This patch fixes it.

Signed-off-by: Jens Osterkamp <redacted>

Index: linux-2.6.20-rc6/drivers/net/spider_net.c
===================================================================
--- linux-2.6.20-rc6.orig/drivers/net/spider_net.c
+++ linux-2.6.20-rc6/drivers/net/spider_net.c
@@ -1925,6 +1925,8 @@ spider_net_stop(struct net_device *netde
 	/* release chains */
 	spider_net_release_tx_chain(card, 1);
 
+	spider_net_free_rx_chain_contents(card);
+
 	spider_net_free_chain(card, &card->tx_chain);
 	spider_net_free_chain(card, &card->rx_chain);
 

Re: [PATCH] spidernet : fix memory leak in spider_net_stop

From: Jens Osterkamp <hidden>
Date: 2007-02-01 20:40:10

On Thursday 01 February 2007 6:36 pm, Linas Vepstas wrote:
A variant of this patch is queued up for 2.6.21,
as a part of the patch
http://www.mail-archive.com/netdev@vger.kernel.org/msg28213.html

I beleive its in the -mm tree, I have not checked.
Ah, good ! I knew that you had several patches in the queue but wasnt aware
of the detailed content.

Jens

Re: [PATCH] spidernet : fix memory leak in spider_net_stop

From: Jeff Garzik <hidden>
Date: 2007-02-02 13:34:37

Jens Osterkamp wrote:
We forget to call spider_net_free_rx_chain_contents which does the
actual dev_kfree_skb. New skbs are allocated from skbuff_head_cache
on each "ifconfig up" letting the cache grow infinitely.

This patch fixes it.

Signed-off-by: Jens Osterkamp <redacted>
applied

Re: [PATCH] spidernet : fix memory leak in spider_net_stop

From: Ishizaki Kou <hidden>
Date: 2007-02-08 04:16:00

Jeff-san,
Jens Osterkamp wrote:
quoted
We forget to call spider_net_free_rx_chain_contents which does the
actual dev_kfree_skb. New skbs are allocated from skbuff_head_cache
on each "ifconfig up" letting the cache grow infinitely.

This patch fixes it.

Signed-off-by: Jens Osterkamp <redacted>
applied
This fix was applied twice to netdev-2.6.git#upstream.
Because Linas-san's patch has been applied to netdev-2.6.git#upstream.

Best regards,
Kou Ishizaki
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help