From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark McLoughlin Subject: Re: 2.6.29-rc3 circular locking dependency detected Date: Tue, 03 Feb 2009 16:35:29 +0000 Message-ID: <1233678929.3726.48.camel@blaa> References: <1233656726.3726.22.camel@blaa> <498820B2.3000606@redhat.com> Reply-To: Mark McLoughlin Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: kvm To: Avi Kivity Return-path: Received: from mx2.redhat.com ([66.187.237.31]:36552 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752038AbZBCQfc (ORCPT ); Tue, 3 Feb 2009 11:35:32 -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 n13GZWlo010026 for ; Tue, 3 Feb 2009 11:35:32 -0500 In-Reply-To: <498820B2.3000606@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, 2009-02-03 at 12:47 +0200, Avi Kivity wrote: > Mark McLoughlin wrote: > > 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? Just from a quick look, that seems right - also need to remove the locking from kvm_iommu_unmap_memslots() Cheers, Mark.