netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Avi Kivity <avi@redhat.com>
Cc: Shirley Ma <mashirle@us.ibm.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH] fix memory leak in virtio_net
Date: Wed, 12 Aug 2009 22:11:53 +0930	[thread overview]
Message-ID: <200908122211.53890.rusty@rustcorp.com.au> (raw)
In-Reply-To: <4A815B9A.3060205@redhat.com>

On Tue, 11 Aug 2009 09:22:58 pm Avi Kivity wrote:
> (copying Rusty, the virtio maintainer)
> 
> On 08/10/2009 11:05 PM, Shirley Ma wrote:
> > Whild reading virtio code, I found some memory leak in removing
> > virtio_net.
> >
> > In virtnet_remove, only skb has been freed not the pages in skb
> > frags. Here is the patch to fix this, please review it.

Nope, kfree_skb() frees the frags.

It needs to, otherwise we leak on every received packet!

Cheers,
Rusty.

      parent reply	other threads:[~2009-08-12 12:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-10 20:05 [PATCH] fix memory leak in virtio_net Shirley Ma
2009-08-11  5:03 ` Shirley Ma
2009-08-11 11:52 ` Avi Kivity
2009-08-11 16:56   ` Shirley Ma
2009-08-12 12:41   ` Rusty Russell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200908122211.53890.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mashirle@us.ibm.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).