Commit 7b54c165 authored by Linus Torvalds's avatar Linus Torvalds

vfs: don't BUG_ON() if following a /proc fd pseudo-symlink results in a symlink

It's "normal" - it can happen if the file descriptor you followed was
opened with O_NOFOLLOW.
Reported-by: default avatarDave Jones <davej@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@kernel.org
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 47b3bc90
...@@ -689,8 +689,6 @@ void nd_jump_link(struct nameidata *nd, struct path *path) ...@@ -689,8 +689,6 @@ void nd_jump_link(struct nameidata *nd, struct path *path)
nd->path = *path; nd->path = *path;
nd->inode = nd->path.dentry->d_inode; nd->inode = nd->path.dentry->d_inode;
nd->flags |= LOOKUP_JUMPED; 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) static inline void put_link(struct nameidata *nd, struct path *link, void *cookie)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment