[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#561890: lenny kernel memory leak?

On Thu, 2011-01-20 at 22:17 +0200, Mikko Rapeli wrote:
> On Wed, May 05, 2010 at 11:47:42PM +0200, Moritz Muehlenhoff wrote:
> > > > > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e7087a828f8714e464fff18d93618727530dfd89;hp=5adf6d63c1697ce1835daf2b5393488a71ee0dca
> > 
> > Did it fix the issue?
> Yes, this does fix the issue. I had not done kernel upgrades since Dec 2009 and
> the custom 2.6.26 with that patch survived a whole year. Then after applying
> kernel security updates the machine was running out of memory again.
> Another custom build of 2.6.26-26lenny1 with that patch is much better
> and slab is not growing like without the patch.
> Please apply that patch to lenny kernels in the next bug fix round.

I've added the following patch.


From: Ivo van Doorn <ivdoorn@gmail.com>
Date: Sun, 20 Jul 2008 18:03:58 +0200
Subject: [PATCH] rt2x00: Fix memleak when RTS/CTS fails

commit e7087a828f8714e464fff18d93618727530dfd89 upstream.

When sending the RTS/CTS frame fails, we should
free the skb buffer which was created.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
[bwh: Adjust context for 2.6.26]
 drivers/net/wireless/rt2x00/rt2x00mac.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 802ddba..591e0ed 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -69,6 +69,7 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
 	skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED;
 	if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, queue, skb, control)) {
+		dev_kfree_skb_any(skb);
 		WARNING(rt2x00dev, "Failed to send RTS/CTS frame.\n");
 		return NETDEV_TX_BUSY;

Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: