From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: 2.6.29-rc3 circular locking dependency detected Date: Tue, 03 Feb 2009 12:47:14 +0200 Message-ID: <498820B2.3000606@redhat.com> References: <1233656726.3726.22.camel@blaa> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm To: Mark McLoughlin Return-path: Received: from mx2.redhat.com ([66.187.237.31]:47998 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751391AbZBCKrT (ORCPT ); Tue, 3 Feb 2009 05:47:19 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n13AlJwM004819 for ; Tue, 3 Feb 2009 05:47:19 -0500 In-Reply-To: <1233656726.3726.22.camel@blaa> Sender: kvm-owner@vger.kernel.org List-ID: 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: [] kvm_emulate_pio+0x1ab/0x1ff [kvm] > > but task is already holding lock: > (&kvm->slots_lock){----}, at: [] 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){----}: > [] __lock_acquire+0xaab/0xc41 > [] lock_acquire+0x8d/0xba > [] down_read+0x4b/0x7f > [] kvm_iommu_map_guest+0x62/0xb8 [kvm] > [] kvm_vm_ioctl+0x3f4/0x7f1 [kvm] > [] vfs_ioctl+0x2a/0x78 > [] do_vfs_ioctl+0x46b/0x4ab > [] sys_ioctl+0x55/0x77 > [] system_call_fastpath+0x16/0x1b > [] 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