From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface Date: Sun, 28 Jun 2009 16:25:19 +0300 Message-ID: <4A476F3F.3090301@redhat.com> References: <20090625132441.26748.641.stgit@dev.haskins.net> <20090625132826.26748.15607.stgit@dev.haskins.net> <20090628110650.GA8061@redhat.com> <4A476714.2000602@novell.com> <20090628131859.GC11866@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Gregory Haskins , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, paulmck@linux.vnet.ibm.com, davidel@xmailserver.org, rusty@rustcorp.com.au To: "Michael S. Tsirkin" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:41391 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751102AbZF1NXx (ORCPT ); Sun, 28 Jun 2009 09:23:53 -0400 In-Reply-To: <20090628131859.GC11866@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/28/2009 04:18 PM, Michael S. Tsirkin wrote: > > that could be the case, as we have, for example: > > static struct file_operations kvm_vm_fops = { > .release = kvm_vm_release, > .unlocked_ioctl = kvm_vm_ioctl, > .compat_ioctl = kvm_vm_ioctl, > .mmap = kvm_vm_mmap, > }; > > with no owner field. > > Avi, shouldn't we initialize the owner field to prevent > kvm module from going away while files are open? > We do initialize it: kvm_chardev_ops.owner = module; kvm_vm_fops.owner = module; kvm_vcpu_fops.owner = module; The reason it's not done through the initializer is that we set the owner to the vendor module (e.g. kvm-intel.ko) so that you can't remove the vendor module when a guest is running. -- error compiling committee.c: too many arguments to function