public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm <kvm@vger.kernel.org>
Subject: Re: KVM: fix cleanup_srcu_struct use-after-free
Date: Sun, 17 Jan 2010 14:28:34 +0200	[thread overview]
Message-ID: <4B530272.2020704@redhat.com> (raw)
In-Reply-To: <20100116020040.GA4611@amt.cnet>

On 01/16/2010 04:00 AM, Marcelo Tosatti wrote:
> kvm_destroy_vm should free "struct kvm" after cleanup_srcu_struct.
>
> Signed-off-by: Marcelo Tosatti<mtosatti@redhat.com>
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index e0a591d..c828a39 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -509,8 +509,8 @@ static void kvm_destroy_vm(struct kvm *kvm)
>   #else
>   	kvm_arch_flush_shadow(kvm);
>   #endif
> -	kvm_arch_destroy_vm(kvm);
>   	cleanup_srcu_struct(&kvm->srcu);
> +	kvm_arch_destroy_vm(kvm);
>   	hardware_disable_all();
>   	mmdrop(mm);
>   }
>    

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2010-01-17 12:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-16  2:00 KVM: fix cleanup_srcu_struct use-after-free Marcelo Tosatti
2010-01-17 12:28 ` Avi Kivity [this message]
2010-01-19 13:50 ` Jan Kiszka
2010-01-19 14:45   ` KVM: fix cleanup_srcu_struct on vm destruction Marcelo Tosatti

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=4B530272.2020704@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /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