From: Linus Torvalds Date: Tue, 30 Jan 2018 22:43:12 +0000 (-0800) Subject: Merge branch 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm... X-Git-Tag: v4.19~1737 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2afe738fc070bf681227c0c9d95b9cd0c4782b0f;p=platform%2Fkernel%2Flinux-rpi.git Merge branch 'userns-linus' of git://git./linux/kernel/git/ebiederm/user-namespace Pull userns updates from Eric Biederman: "Between the holidays and other distractions only a small amount of namespace work made it into my tree this time. Just a final cleanup from a revert several kernels ago and a small typo fix from Wolffhardt Schwabe" * 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: fix typo in assignment of fs default overflow gid autofs4: Modify autofs_wait to use current_uid() and current_gid() userns: Don't fail follow_automount based on s_user_ns --- 2afe738fc070bf681227c0c9d95b9cd0c4782b0f diff --cc fs/namei.c index 9cc91fb,f47118e..4e3fc58 --- a/fs/namei.c +++ b/fs/namei.c @@@ -1129,13 -1129,19 +1129,10 @@@ static int follow_automount(struct pat * of the daemon to instantiate them before they can be used. */ if (!(nd->flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY | - LOOKUP_OPEN | LOOKUP_CREATE | - LOOKUP_AUTOMOUNT))) { - /* Positive dentry that isn't meant to trigger an - * automount, EISDIR will allow it to be used, - * otherwise there's no mount here "now" so return - * ENOENT. - */ - if (path->dentry->d_inode) - return -EISDIR; - else - return -ENOENT; - } + LOOKUP_OPEN | LOOKUP_CREATE | LOOKUP_AUTOMOUNT)) && + path->dentry->d_inode) + return -EISDIR; - if (path->dentry->d_sb->s_user_ns != &init_user_ns) - return -EACCES; - nd->total_link_count++; if (nd->total_link_count >= 40) return -ELOOP;