From: "Michael S. Tsirkin" <mst@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>,
Christian Borntraeger <borntraeger@de.ibm.com>,
virtualization@lists.linux-foundation.org,
Anthony Liguori <anthony@codemonkey.ws>,
kvm@vger.ker
Subject: Re: [PATCH 1/2] virtio: fix memory leak on device removal
Date: Tue, 21 Jul 2009 19:03:15 +0300 [thread overview]
Message-ID: <20090721160315.GA3341@redhat.com> (raw)
In-Reply-To: <20090721155909.GB3306@redhat.com>
Free up msi vector tables.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
Resending with corrected To list. Sorry about the churn.
drivers/virtio/virtio_pci.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 193c8f0..dab3c86 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -489,12 +489,15 @@ static void vp_del_vq(struct virtqueue *vq)
/* the config->del_vqs() implementation */
static void vp_del_vqs(struct virtio_device *vdev)
{
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
struct virtqueue *vq, *n;
list_for_each_entry_safe(vq, n, &vdev->vqs, list)
vp_del_vq(vq);
vp_free_vectors(vdev);
+ kfree(vp_dev->msix_names);
+ kfree(vp_dev->msix_entries);
}
/* the config->find_vqs() implementation */
--
1.6.2.5
next prev parent reply other threads:[~2009-07-21 16:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1248181714.git.mst@redhat.com>
2009-07-21 15:59 ` [PATCH 1/2] virtio: fix memory leak on device removal Michael S. Tsirkin
2009-07-21 16:03 ` Michael S. Tsirkin [this message]
2009-07-23 4:26 ` Rusty Russell
2009-07-23 10:27 ` Michael S. Tsirkin
2009-07-21 15:59 ` [PATCH 2/2] virtio: fix double free_irq Michael S. Tsirkin
2009-07-23 4:40 ` Rusty Russell
2009-07-23 9:08 ` Michael S. Tsirkin
2009-07-23 10:20 ` Michael S. Tsirkin
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=20090721160315.GA3341@redhat.com \
--to=mst@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=borntraeger@de.ibm.com \
--cc=kvm@vger.ker \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.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).