spidernet : fix memory leak in spider_net_stop
Subsystems (2)
PATCH 1/1 spidernet : fix memory leak in spider_net_stop
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.
drivers/net/spider_net.c +2 -0
@@ -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);
A variant of this patch is queued up for 2.6.21,
as a part of the patch
http://www.mail-archive.com/[email protected]/msg28213.html
I beleive its in the -mm tree, I have not checked.
--linas
Quoted 22 lines · Jens Osterkamp
We forget to call
spider_net_free_rx_chain_contentswhich does the actualdev_kfree_skb. New skbs are allocated fromskbuff_head_cacheon each "ifconfig up" letting the cache grow infinitely.This patch fixes it.
Signed-off-by Jens Osterkamp <[email protected]>Index:
linux-2.6.20-rc6/drivers/net/spider_net.c
===================================================================drivers/net/spider_net.c +2
-0@@ -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);
Quoted 6 lines · Linas Vepstas
A variant of this patch is queued up for 2.6.21,
as a part of the patch
http://www.mail-archive.com/[email protected]/msg28213.htmlI 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
Jeff Garzik
AppliedQuoted 7 lines · Jens Osterkamp
We forget to call
spider_net_free_rx_chain_contentswhich does the actualdev_kfree_skb. New skbs are allocated fromskbuff_head_cacheon each "ifconfig up" letting the cache grow infinitely.This patch fixes it.
Signed-off-by Jens Osterkamp <[email protected]>
applied
Jeff-san,
Quoted 10 lines
Quoted 7 lines · Jens Osterkamp
We forget to call
spider_net_free_rx_chain_contentswhich does the actualdev_kfree_skb. New skbs are allocated fromskbuff_head_cacheon each "ifconfig up" letting the cache grow infinitely.This patch fixes it.
Signed-off-by Jens Osterkamp <[email protected]>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