From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Kent Subject: Re: Linux 2.6.26-rc4 Date: Tue, 03 Jun 2008 21:27:02 +0800 Message-ID: <1212499623.3025.46.camel@raven.themaw.net> References: <47107.195.41.66.226.1212486572.squirrel@mail.jabbernet.dk> <20080603095713.GR28946@ZenIV.linux.org.uk> <5440.195.41.66.226.1212487482.squirrel@mail.jabbernet.dk> <20080603104035.GT28946@ZenIV.linux.org.uk> <20080603105258.GV28946@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Miklos Szeredi , jesper@krogh.cc, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Al Viro Return-path: Received: from out2.smtp.messagingengine.com ([66.111.4.26]:52395 "EHLO out2.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752235AbYFCNp5 (ORCPT ); Tue, 3 Jun 2008 09:45:57 -0400 In-Reply-To: <20080603105258.GV28946@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, 2008-06-03 at 11:52 +0100, Al Viro wrote: > On Tue, Jun 03, 2008 at 12:45:33PM +0200, Miklos Szeredi wrote: > > > I think it must be autofs4 doing something weird. Like this in > > autofs4_lookup_unhashed(): > > > > /* > > * Make the rehashed dentry negative so the VFS > > * behaves as it should. > > */ > > if (inode) { > > dentry->d_inode = NULL; > > Lovely. If we ever step into that with somebody else (no matter who) > holding a reference to that dentry, we are certainly well and truly > buggered. It's not just mount(2) - everything in the tree assumes that > holding a reference to positive dentry guarantees that it remains > positive. The intent here is that, the dentry above is unhashed at this point, and if hasn't been reclaimed by the VFS, it is made negative and replaces the unhashed negative dentry passed to ->lookup(). The reference count is incremented to account for the reference held by the path walk. What am I doing wrong here? Ian