From: Avi Kivity <avi@redhat.com>
To: Mark McLoughlin <markmc@redhat.com>
Cc: kvm <kvm@vger.kernel.org>
Subject: Re: 2.6.29-rc3 circular locking dependency detected
Date: Tue, 03 Feb 2009 12:47:14 +0200 [thread overview]
Message-ID: <498820B2.3000606@redhat.com> (raw)
In-Reply-To: <1233656726.3726.22.camel@blaa>
Mark McLoughlin wrote:
> Hi,
>
> Just saw this when starting a guest with an assigned device.
>
> Cheers,
> Mark.
>
> =======================================================
> [ INFO: possible circular locking dependency detected ]
> 2.6.29-0.74.rc3.git3.fc11.x86_64 #1
> -------------------------------------------------------
> qemu-kvm/3706 is trying to acquire lock:
> (&kvm->lock){--..}, at: [<ffffffffa013a25f>] kvm_emulate_pio+0x1ab/0x1ff [kvm]
>
> but task is already holding lock:
> (&kvm->slots_lock){----}, at: [<ffffffffa013c4c0>] kvm_arch_vcpu_ioctl_run+0x49
> 7/0x73a [kvm]
>
This is the expected nesting. kvm->slots_lock is outer to kvm->lock.
> which lock already depends on the new lock.
>
> the existing dependency chain (in reverse order) is:
>
> -> #1 (&kvm->slots_lock){----}:
> [<ffffffff8106e9c1>] __lock_acquire+0xaab/0xc41
> [<ffffffff8106ebe4>] lock_acquire+0x8d/0xba
> [<ffffffff813826ae>] down_read+0x4b/0x7f
> [<ffffffffa0137ff2>] kvm_iommu_map_guest+0x62/0xb8 [kvm]
> [<ffffffffa01363ea>] kvm_vm_ioctl+0x3f4/0x7f1 [kvm]
> [<ffffffff810eac30>] vfs_ioctl+0x2a/0x78
> [<ffffffff810eb0e9>] do_vfs_ioctl+0x46b/0x4ab
> [<ffffffff810eb17e>] sys_ioctl+0x55/0x77
> [<ffffffff810112ba>] system_call_fastpath+0x16/0x1b
> [<ffffffffffffffff>] 0xffffffffffffffff
>
I think taking slots_lock in kvm_vm_ioctl_assign_device() (and dropping
it from kvm_iommu_map_guest) should suffice, no?
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2009-02-03 10:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-03 10:25 2.6.29-rc3 circular locking dependency detected Mark McLoughlin
2009-02-03 10:47 ` Avi Kivity [this message]
2009-02-03 16:35 ` Mark McLoughlin
2009-02-05 18:23 ` [PATCH 1/1] kvm: fix circular locking dependency Mark McLoughlin
2009-02-05 18:52 ` Chris Wright
2009-02-06 8:57 ` Mark McLoughlin
2009-02-08 5:28 ` Marcelo Tosatti
2009-02-08 9:43 ` Avi Kivity
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=498820B2.3000606@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=markmc@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