From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: Fix possible circular locking in kvm_vm_ioctl_assign_device() Date: Tue, 15 Dec 2009 11:35:13 +0200 Message-ID: <4B275851.8010904@redhat.com> References: <20091214191233.GA6065@amt.cnet> <1260844087-5485-1-git-send-email-sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Sheng Yang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:22388 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752876AbZLOJfQ (ORCPT ); Tue, 15 Dec 2009 04:35:16 -0500 In-Reply-To: <1260844087-5485-1-git-send-email-sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/15/2009 04:28 AM, Sheng Yang wrote: > One possible order is: > > KVM_CREATE_IRQCHIP ioctl(took kvm->lock) -> kvm_iobus_register_dev() -> > down_write(kvm->slots_lock). > > The other one is in kvm_vm_ioctl_assign_device(), which take kvm->slots_lock > first, then kvm->lock. > > Update the comment of lock order as well. > > Observe it due to kernel locking debug warnings. > Applied and queued for 2.6.33, thanks. -- error compiling committee.c: too many arguments to function