spidernet : fix memory leak in spider_net_stop
authorJens Osterkamp <jens@de.ibm.com>
Thu, 1 Feb 2007 11:07:47 +0000 (12:07 +0100)
committerJeff Garzik <jeff@garzik.org>
Fri, 2 Feb 2007 13:34:10 +0000 (08:34 -0500)
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>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/spider_net.c

index ebb6aa39f9c7c18895f7c15d5858674c30f48f70..8ea2fc1b96cb8d4f5c5125808dafd08849e2ccb7 100644 (file)
@@ -1925,6 +1925,8 @@ spider_net_stop(struct net_device *netdev)
        /* 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);