From: Al Viro Subject: Re: inode_permission NULL pointer dereference in 3.13-rc1 Date: Fri, 29 Nov 2013 02:07:03 +0000 Message-ID: <20131129020703.GR10323@ZenIV.linux.org.uk> References: <20131125160648.GA4933@infradead.org> <20131126131134.GM10323@ZenIV.linux.org.uk> <20131126141253.GA28062@infradead.org> <20131127064351.GN10323@ZenIV.linux.org.uk> <20131127100906.GA19740@infradead.org> <20131128162618.GO10323@ZenIV.linux.org.uk> <20131128212301.GP10323@ZenIV.linux.org.uk> <20131128225102.GS10988@dastard> <20131128234441.GQ10323@ZenIV.linux.org.uk> <20131129014648.GU10988@dastard> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, Linus Torvalds , xfs@oss.sgi.com To: Dave Chinner Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:52898 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753467Ab3K2CHG (ORCPT ); Thu, 28 Nov 2013 21:07:06 -0500 Content-Disposition: inline In-Reply-To: <20131129014648.GU10988@dastard> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Nov 29, 2013 at 12:46:48PM +1100, Dave Chinner wrote: > > * d_count(dentry) is -128 > > void lockref_mark_dead(struct lockref *lockref) > { > assert_spin_locked(&lockref->lock); > lockref->count = -128; > } ... done once refcount reaches zero and we decide to evict the sucker. Which, for dentry that happens to be * pwd of at least one process * root of at least one process * root dentry of a filesystem that contains at least one binary being executed means that we have dropped several references too many. Thus the comment about unbalanced dput() somewhere; the question is _where_ had that dput() been.