All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Frediano Ziglio <freddy77@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Possible leak in block/qcow.c
Date: Mon, 18 Jul 2011 11:33:18 +0200	[thread overview]
Message-ID: <4E23FDDE.5070105@redhat.com> (raw)
In-Reply-To: <CAHt6W4d+aOh-3A4zp8fJGRNs0Tzk4Mo+c5ec4uN7SMjwh6UO9Q@mail.gmail.com>

Am 18.07.2011 09:25, schrieb Frediano Ziglio:
> Hi,
>   I noted that there are two cluster_data member in block/qcow.c, one
> in BDRVQcowState, the other in QCowAIOCB. The last one is used in
> qcow_aio_write_cb to hold buffer for encrypt the cluster before write
> but I cannot find any related qemu_free while I can find many place
> where BDRVQcowState::cluster_data is freed. It seems to me a leak but
> I don't understand why nobody reported this problem before (it should
> happen at every write so anybody using qcow encrypted should rapidly
> see this problem). Perhaps there is a sort of garbage collector I'm
> not aware?

The trick is that ACBs are reused. I think they won't be freed while
qemu is running, so the number of ACBs you have is the maximum number of
parallel requests you had while running the VM. It's typically not a
very large number.

Kevin

      reply	other threads:[~2011-07-18  9:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18  7:25 [Qemu-devel] Possible leak in block/qcow.c Frediano Ziglio
2011-07-18  9:33 ` Kevin Wolf [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=4E23FDDE.5070105@redhat.com \
    --to=kwolf@redhat.com \
    --cc=freddy77@gmail.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.