xfs
[Top] [All Lists]

Re: inode_permission NULL pointer dereference in 3.13-rc1

To: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: inode_permission NULL pointer dereference in 3.13-rc1
From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Date: Fri, 29 Nov 2013 02:41:21 +0000
Cc: Dave Chinner <david@xxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <CA+55aFxLZxy75fO4ZXO4Stiu1sMx1q=eJ7HSk-UTCX61jPrirA@xxxxxxxxxxxxxx>
References: <20131125160648.GA4933@xxxxxxxxxxxxx> <20131126131134.GM10323@xxxxxxxxxxxxxxxxxx> <20131126141253.GA28062@xxxxxxxxxxxxx> <20131127064351.GN10323@xxxxxxxxxxxxxxxxxx> <20131127100906.GA19740@xxxxxxxxxxxxx> <20131128162618.GO10323@xxxxxxxxxxxxxxxxxx> <20131128212301.GP10323@xxxxxxxxxxxxxxxxxx> <20131128225102.GS10988@dastard> <20131128234441.GQ10323@xxxxxxxxxxxxxxxxxx> <CA+55aFxLZxy75fO4ZXO4Stiu1sMx1q=eJ7HSk-UTCX61jPrirA@xxxxxxxxxxxxxx>
Sender: Al Viro <viro@xxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Nov 28, 2013 at 06:07:27PM -0800, Linus Torvalds wrote:

> HOWEVER. It's certainly *not* valid if "current->fs->root/pwd" points
> to it. So yeah, there must have been an extra dput() somewhere. Or,
> more likely, I think, we don't get the refcount to some dentry
> properly any more.
> 
> I don't see where, though. You did change where "LOOKUP_RCU" is
> cleared in unlazy_walk() but you did add that
> 
>         nd->path.dentry = NULL;
> 
> and that looks like it should be ok. And I don't see what else would care.

*nod*

BTW, vfsmount refcount is 12, so we *definitely* nowhere near the
final mntput(), etc. and mnt->mnt_root itself should also have
contributed.

I'm going to try to find out _which_ test buggers the refcount - at
least that way I'll have something resembling a usable reproducer...

<Prev in Thread] Current Thread [Next in Thread>