From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758186AbYB1Hwg (ORCPT ); Thu, 28 Feb 2008 02:52:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753000AbYB1Hw1 (ORCPT ); Thu, 28 Feb 2008 02:52:27 -0500 Received: from bzq-179-150-194.static.bezeqint.net ([212.179.150.194]:52170 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752606AbYB1Hw1 (ORCPT ); Thu, 28 Feb 2008 02:52:27 -0500 Message-ID: <47C66839.7080607@qumranet.com> Date: Thu, 28 Feb 2008 09:52:25 +0200 From: Avi Kivity User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Roland Dreier CC: Davide Libenzi , Christoph Hellwig , linux-fsdevel@vger.kernel.org, Linux Kernel Mailing List , kvm-devel@lists.sourceforge.net, Andrew Morton , Al Viro Subject: Re: [PATCH/RFC 1/2] anon-inodes: Remove fd_install() from anon_inode_getfd() References: <20080225191043.GA32342@lst.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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