Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761986AbXFJRZd (ORCPT ); Sun, 10 Jun 2007 13:25:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761491AbXFJRZM (ORCPT ); Sun, 10 Jun 2007 13:25:12 -0400 Received: from smtp2.linux-foundation.org ([207.189.120.14]:33669 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760974AbXFJRZJ (ORCPT ); Sun, 10 Jun 2007 13:25:09 -0400 Date: Sun, 10 Jun 2007 10:23:43 -0700 (PDT) From: Linus Torvalds To: Al Viro cc: dean gaudet , Kyle Moffett , Ulrich Drepper , Davide Libenzi , Alan Cox , Theodore Tso , Eric Dumazet , Linux Kernel Mailing List , Andrew Morton , Ingo Molnar Subject: Re: [patch 7/8] fdmap v2 - implement sys_socket2 In-Reply-To: <20070610054628.GF21478@ftp.linux.org.uk> Message-ID: References: <20070609165454.GE4095@ftp.linux.org.uk> <466ADEAB.7080202@redhat.com> <20070609172429.GF4095@ftp.linux.org.uk> <2E51520E-EC73-457F-809A-4749ED9A3C97@mac.com> <20070609200645.GG4095@ftp.linux.org.uk> <20070610031922.GC21478@ftp.linux.org.uk> <20070610054628.GF21478@ftp.linux.org.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 810 Lines: 20 On Sun, 10 Jun 2007, Al Viro wrote: > > On FreeBSD it will simply give you zero st_ino on almost all sockets; > AF_UNIX ones get st_ino invented (and stable). st_dev is NODEV in all > cases... So it will still work better than trying to do a "getsockname()" or something. If the file descriptor really _has_ been changed, it might give a false negative (somebody replaced it with *another* socket), but on the other hand, that's much better than a false positive. And if somebody replaced the socket with a real file descriptor, it will catch it.. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/