From patchwork Tue May 5 11:58:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 21848 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n45Bxih3012074 for ; Tue, 5 May 2009 11:59:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753353AbZEEL7k (ORCPT ); Tue, 5 May 2009 07:59:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753314AbZEEL7k (ORCPT ); Tue, 5 May 2009 07:59:40 -0400 Received: from mx2.redhat.com ([66.187.237.31]:39300 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751139AbZEEL7k (ORCPT ); Tue, 5 May 2009 07:59:40 -0400 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 n45BxfnG014920 for ; Tue, 5 May 2009 07:59:41 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n45BxeQa012393; Tue, 5 May 2009 07:59:40 -0400 Received: from redhat.com (dhcp-0-223.tlv.redhat.com [10.35.0.223]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n45BxbGb030372; Tue, 5 May 2009 07:59:38 -0400 Date: Tue, 5 May 2009 14:58:41 +0300 From: "Michael S. Tsirkin" To: avi@redhat.com, kvm@vger.kernel.org Subject: [PATCH] kvm: fix comment on locking Message-ID: <20090505115841.GA16647@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org __kvm_set_memory_region callers must (and do) take slots_lock, not mmap_sem, for write. Fix the comment to match this reality. Signed-off-by: Michael S. Tsirkin --- virt/kvm/kvm_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 605697e..060d86c 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -911,7 +911,7 @@ static int kvm_vm_release(struct inode *inode, struct file *filp) * * Discontiguous memory is allowed, mostly for framebuffers. * - * Must be called holding mmap_sem for write. + * Must be called holding slots_lock for write. */ int __kvm_set_memory_region(struct kvm *kvm, struct kvm_userspace_memory_region *mem,