]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
vfs: don't BUG_ON() if following a /proc fd pseudo-symlink results in a symlink
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Mar 2013 17:03:07 +0000 (09:03 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Mar 2013 18:26:24 +0000 (11:26 -0700)
commit 7b54c165a0c012edbaeaa73c5c87cb73721eb580 upstream.

It's "normal" - it can happen if the file descriptor you followed was
opened with O_NOFOLLOW.

Reported-by: Dave Jones <davej@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/namei.c

index 43a97ee1d4c864e4053f86aec5830e037721d125..ec97aef5c21cc40e08074c48a9c34a41568694da 100644 (file)
@@ -693,8 +693,6 @@ void nd_jump_link(struct nameidata *nd, struct path *path)
        nd->path = *path;
        nd->inode = nd->path.dentry->d_inode;
        nd->flags |= LOOKUP_JUMPED;
-
-       BUG_ON(nd->inode->i_op->follow_link);
 }
 
 static inline void put_link(struct nameidata *nd, struct path *link, void *cookie)