From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: chrisw@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCHv2] vhost: fix double free on device stop
Date: Wed, 22 Jun 2011 11:04:44 +0800 [thread overview]
Message-ID: <4E015BCC.8090007@redhat.com> (raw)
In-Reply-To: <20110621173417.GA17272@redhat.com>
On 06/22/2011 01:34 AM, Michael S. Tsirkin wrote:
> vhost dev stop failed to clear the log field.
> Typically not an issue as dev start overwrites this field,
> but if logging gets disabled before the following start,
> it doesn't so this causes a double free.
>
> Signed-off-by: Michael S. Tsirkin<mst@redhat.com>
> ---
Acked-by: Jason Wang <jasowang@redhat.com>
> hw/vhost.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/hw/vhost.c b/hw/vhost.c
> index 80f771e..c3d8821 100644
> --- a/hw/vhost.c
> +++ b/hw/vhost.c
> @@ -784,5 +784,6 @@ void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev)
>
> hdev->started = false;
> qemu_free(hdev->log);
> + hdev->log = NULL;
> hdev->log_size = 0;
> }
prev parent reply other threads:[~2011-06-22 3:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-21 17:34 [Qemu-devel] [PATCHv2] vhost: fix double free on device stop Michael S. Tsirkin
2011-06-21 17:49 ` Chris Wright
2011-06-22 3:04 ` Jason Wang [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=4E015BCC.8090007@redhat.com \
--to=jasowang@redhat.com \
--cc=armbru@redhat.com \
--cc=chrisw@redhat.com \
--cc=mst@redhat.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 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).