Message ID | 1457391064-6660-218-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/fs/namei.c b/fs/namei.c index 1047096..414561f 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1714,6 +1714,11 @@ static inline int should_follow_link(struct nameidata *nd, struct path *link, return 0; if (!follow) return 0; + /* make sure that d_is_symlink above matches inode */ + if (nd->flags & LOOKUP_RCU) { + if (read_seqcount_retry(&link->dentry->d_seq, seq)) + return -ECHILD; + } return pick_link(nd, link, inode, seq); }