All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, Adam Litke <agl@us.ibm.com>
Subject: [Qemu-devel] Re: virtio_cleanup() missing in virtio-{blk, balloon, 9p}-pci
Date: Mon, 11 Oct 2010 12:19:04 +0200	[thread overview]
Message-ID: <4CB2E498.3070008@redhat.com> (raw)
In-Reply-To: <m3lj65122k.fsf@blackfin.pond.sub.org>

Am 11.10.2010 12:00, schrieb Markus Armbruster:
> Pattern:
> 
> FOO's PCIDeviceInfo method exit is virtio_FOO_exit_pci(), which calls
> virtio_FOO_exit() and virtio_exit_pci().
> 
> virtio_{net,serial}_exit() call virtio_cleanup().
> 
> virtio_blk_exit() doesn't.  Why?
> 
> virtio-balloon-pci uses virtio_exit_pci() as exit method.  No
> virtio_cleanup()?
> 
> virtio-9p-pci doesn't have an exit method.  Doesn't feel right.
> 
> I suspect these three leak memory or worse on hot unplug.

Yes, virtio-blk seems to leak memory there.

We should probably also cancel all running requests before removing the
disk. I suspect not doing this could cause some segfaults when the AIO
callback wants to access a disk that doesn't exist any more.

Kevin

  reply	other threads:[~2010-10-11 10:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-11 10:00 [Qemu-devel] virtio_cleanup() missing in virtio-{blk, balloon, 9p}-pci Markus Armbruster
2010-10-11 10:19 ` Kevin Wolf [this message]
2010-10-12 11:59 ` M. Mohan Kumar
2010-10-12 12:18   ` Markus Armbruster

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=4CB2E498.3070008@redhat.com \
    --to=kwolf@redhat.com \
    --cc=agl@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=jvrao@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.