From: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
To: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
Cc: avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: [RFC PATCH] KVM: Fix missing lock for kvm_io_bus_unregister_dev()
Date: Wed, 08 Dec 2010 14:27:37 +0900 [thread overview]
Message-ID: <4CFF1749.5060206@oss.ntt.co.jp> (raw)
In-Reply-To: <20101208014506.4c18b52a.takuya.yoshikawa@gmail.com>
(2010/12/08 1:45), Takuya Yoshikawa wrote:
> diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
> index f628234..d9fe35d 100644
> --- a/arch/x86/kvm/i8259.c
> +++ b/arch/x86/kvm/i8259.c
> @@ -596,7 +596,9 @@ void kvm_destroy_pic(struct kvm *kvm)
> struct kvm_pic *vpic = kvm->arch.vpic;
>
> if (vpic) {
> + mutex_lock(&kvm->slots_lock);
> kvm_io_bus_unregister_dev(kvm, KVM_PIO_BUS,&vpic->dev);
> + mutex_unlock(&kvm->slots_lock);
> kvm->arch.vpic = NULL;
> kfree(vpic);
> }
Ah, this seems to break the lock ordering
kvm->lock --> kvm->slots_lock --> kvm->irq_lock
I'll recheck later.
Takuya
next prev parent reply other threads:[~2010-12-08 5:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-07 16:45 [RFC PATCH] KVM: Fix missing lock for kvm_io_bus_unregister_dev() Takuya Yoshikawa
2010-12-08 5:27 ` Takuya Yoshikawa [this message]
2010-12-08 19:10 ` Marcelo Tosatti
2010-12-09 17:21 ` Takuya Yoshikawa
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=4CFF1749.5060206@oss.ntt.co.jp \
--to=yoshikawa.takuya@oss.ntt.co.jp \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=takuya.yoshikawa@gmail.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