[Cbe-oss-dev] [PATCH] spidernet : fix memory leak in spider_net_stop

Jens Osterkamp jens at de.ibm.com
Thu Feb 1 22:07:47 EST 2007


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



More information about the cbe-oss-dev mailing list