From: Christoph Hellwig <hch@infradead.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: inode_permission NULL pointer dereference in 3.13-rc1
Date: Mon, 25 Nov 2013 08:06:48 -0800 [thread overview]
Message-ID: <20131125160648.GA4933@infradead.org> (raw)
In-Reply-To: <20131124152758.GL10323@ZenIV.linux.org.uk>
On Sun, Nov 24, 2013 at 03:27:58PM +0000, Al Viro wrote:
> which seems to leave two candidates - follow_dotdot_rcu() and path_init(),
> both setting nd->inode to nd->path.dentry->d_inode...
>
> Could you try to reproduce it with something like
> if (read_seqretry(&mount_lock, nd->m_seq))
> goto failed;
> slapped before the success exit in follow_dotdot_rcu(), just to see if
> we are hitting some races with umount here?
Still reproducable with the diff below. Fixed by reverting the RCU'd
vfsmounts.
diff --git a/fs/namei.c b/fs/namei.c
index 8f77a8c..856e4d5 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1158,6 +1158,10 @@ static int follow_dotdot_rcu(struct nameidata *nd)
}
follow_mount_rcu(nd);
nd->inode = nd->path.dentry->d_inode;
+
+ if (read_seqretry(&mount_lock, nd->m_seq))
+ goto failed;
+
return 0;
failed:
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: inode_permission NULL pointer dereference in 3.13-rc1
Date: Mon, 25 Nov 2013 08:06:48 -0800 [thread overview]
Message-ID: <20131125160648.GA4933@infradead.org> (raw)
In-Reply-To: <20131124152758.GL10323@ZenIV.linux.org.uk>
On Sun, Nov 24, 2013 at 03:27:58PM +0000, Al Viro wrote:
> which seems to leave two candidates - follow_dotdot_rcu() and path_init(),
> both setting nd->inode to nd->path.dentry->d_inode...
>
> Could you try to reproduce it with something like
> if (read_seqretry(&mount_lock, nd->m_seq))
> goto failed;
> slapped before the success exit in follow_dotdot_rcu(), just to see if
> we are hitting some races with umount here?
Still reproducable with the diff below. Fixed by reverting the RCU'd
vfsmounts.
diff --git a/fs/namei.c b/fs/namei.c
index 8f77a8c..856e4d5 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1158,6 +1158,10 @@ static int follow_dotdot_rcu(struct nameidata *nd)
}
follow_mount_rcu(nd);
nd->inode = nd->path.dentry->d_inode;
+
+ if (read_seqretry(&mount_lock, nd->m_seq))
+ goto failed;
+
return 0;
failed:
next prev parent reply other threads:[~2013-11-25 16:07 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-24 14:04 inode_permission NULL pointer dereference in 3.13-rc1 Christoph Hellwig
2013-11-24 15:27 ` Al Viro
2013-11-25 16:06 ` Christoph Hellwig [this message]
2013-11-25 16:06 ` Christoph Hellwig
2013-11-26 13:11 ` Al Viro
2013-11-26 13:11 ` Al Viro
2013-11-26 14:12 ` Christoph Hellwig
2013-11-26 14:12 ` Christoph Hellwig
2013-11-27 6:43 ` Al Viro
2013-11-27 6:43 ` Al Viro
2013-11-27 10:09 ` Christoph Hellwig
2013-11-27 10:09 ` Christoph Hellwig
2013-11-28 16:26 ` Al Viro
2013-11-28 16:26 ` Al Viro
2013-11-28 21:23 ` Al Viro
2013-11-28 22:51 ` Dave Chinner
2013-11-28 23:44 ` Al Viro
2013-11-28 23:44 ` Al Viro
2013-11-29 1:46 ` Dave Chinner
2013-11-29 2:07 ` Al Viro
2013-11-29 2:07 ` Al Viro
2013-11-29 2:17 ` Linus Torvalds
2013-11-29 2:07 ` Linus Torvalds
2013-11-29 2:07 ` Linus Torvalds
2013-11-29 2:41 ` Al Viro
2013-11-29 2:41 ` Al Viro
2013-11-29 3:59 ` Al Viro
2013-11-29 3:59 ` Al Viro
2013-11-29 4:06 ` Al Viro
2013-11-29 4:14 ` Al Viro
2013-11-29 6:59 ` Al Viro
2013-11-29 6:59 ` Al Viro
2013-11-29 19:44 ` Greg KH
2013-11-29 19:44 ` Greg KH
2013-11-29 20:17 ` Linus Torvalds
2013-11-29 20:17 ` Linus Torvalds
2013-11-29 23:55 ` Al Viro
2013-11-30 0:18 ` Linus Torvalds
2013-11-30 15:09 ` [GIT PULL] " Theodore Ts'o
2013-11-30 15:09 ` Theodore Ts'o
2013-11-30 15:13 ` Theodore Ts'o
2013-11-30 15:13 ` Theodore Ts'o
2013-11-27 21:51 ` Dave Chinner
2013-11-27 21:51 ` Dave Chinner
2013-11-28 15:21 ` Theodore Ts'o
2013-11-28 15:21 ` Theodore Ts'o
2013-11-28 15:36 ` Theodore Ts'o
2013-11-28 15:36 ` Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131125160648.GA4933@infradead.org \
--to=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.