linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spidernet : fix memory leak in spider_net_stop
@ 2007-02-01 11:07 Jens Osterkamp
  2007-02-01 17:36 ` Linas Vepstas
  2007-02-02 13:34 ` Jeff Garzik
  0 siblings, 2 replies; 5+ messages in thread
From: Jens Osterkamp @ 2007-02-01 11:07 UTC (permalink / raw)
  To: Linas Vepstas, James K Lewis, linuxppc-dev, netdev, jgarzik,
	cbe-oss-dev, Ishizaki Kou


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 <jens@de.ibm.com>

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);
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-02-08  4:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-01 11:07 [PATCH] spidernet : fix memory leak in spider_net_stop Jens Osterkamp
2007-02-01 17:36 ` Linas Vepstas
2007-02-01 20:40   ` Jens Osterkamp
2007-02-02 13:34 ` Jeff Garzik
2007-02-08  4:15   ` Ishizaki Kou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).