From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH 2/3] vfs - fix dentry ref count in do_lookup() Date: Tue, 18 Jan 2011 04:44:14 +0000 Message-ID: <20110118044414.GK22723@ZenIV.linux.org.uk> References: <20110118040449.23109.33071.stgit@localhost6.localdomain6> <20110118040610.23109.32868.stgit@localhost6.localdomain6> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Nick Piggin , David Howells , Kernel Mailing List , linux-fsdevel , Linus Torvalds , Andrew Morton To: Ian Kent Return-path: Content-Disposition: inline In-Reply-To: <20110118040610.23109.32868.stgit@localhost6.localdomain6> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, Jan 18, 2011 at 12:06:10PM +0800, Ian Kent wrote: > There is a ref count problem in fs/namei.c:do_lookup(). > > When walking in ref-walk mode, if follow_managed() returns a fail the > reference held by path.dentry isn't dropped. If we get to follow_managed(), we *are* in ref-walk mode. Unconditionally. Besided, that's path_put_conditional(), not dput() - we might have both grabbed vfsmount on mountpoint crossing *AND* changed dentry. Applied with modifications... The rest applied as-is.