From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH/RFC 1/2] anon-inodes: Remove fd_install() from anon_inode_getfd() Date: Thu, 28 Feb 2008 09:52:25 +0200 Message-ID: <47C66839.7080607@qumranet.com> References: <20080225191043.GA32342@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Davide Libenzi , Christoph Hellwig , linux-fsdevel@vger.kernel.org, Linux Kernel Mailing List , kvm-devel@lists.sourceforge.net, Andrew Morton , Al Viro To: Roland Dreier Return-path: In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Roland Dreier wrote: > > http://git.kernel.org/?p=linux/kernel/git/viro/vfs-2.6.git;a=commit;h=49be4f8114e6ff0efdab10ebba2493fb67bc3034 > > Actually, looking closer at the kvm changes here, I think that > create_vcpu_fd() needs the same treatment as kvm_dev_ioctl_create_vm() > gets in the patch because of the race I mentioned in the changelog > for my patch: otherwise kvm_vcpu_release() could drop the last > reference to vcpu->kvm->filp before the get_file() gets an extra > reference. > > I'm beginning to think that moving the fd_install() out of > anon_inode_getfd() really is worth it to make a safer interface. > It makes is less usable, though (since the last step needs to be taken by the caller. We might add a int (*prepare_file)(...) parameter which anon_inode_getfd() uses to munge the file before installing it. -- error compiling committee.c: too many arguments to function