filename_mountpoint(): make LOOKUP_NO_EVAL unconditional there

user_path_mountpoint_at() always gets it and the reasons to have it
there (i.e. in umount(2)) apply to kern_path_mountpoint() callers
as well.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2019-07-14 12:19:57 -04:00
parent ff0ebee239
commit 39145f5f0c
2 changed files with 1 additions and 3 deletions

View File

@ -2718,7 +2718,7 @@ filename_mountpoint(int dfd, struct filename *name, struct path *path,
if (unlikely(error == -ESTALE)) if (unlikely(error == -ESTALE))
error = path_mountpoint(&nd, flags | LOOKUP_REVAL, path); error = path_mountpoint(&nd, flags | LOOKUP_REVAL, path);
if (likely(!error)) if (likely(!error))
audit_inode(name, path->dentry, flags & LOOKUP_NO_EVAL); audit_inode(name, path->dentry, LOOKUP_NO_EVAL);
restore_nameidata(); restore_nameidata();
putname(name); putname(name);
return error; return error;

View File

@ -1675,8 +1675,6 @@ int ksys_umount(char __user *name, int flags)
if (!(flags & UMOUNT_NOFOLLOW)) if (!(flags & UMOUNT_NOFOLLOW))
lookup_flags |= LOOKUP_FOLLOW; lookup_flags |= LOOKUP_FOLLOW;
lookup_flags |= LOOKUP_NO_EVAL;
retval = user_path_mountpoint_at(AT_FDCWD, name, lookup_flags, &path); retval = user_path_mountpoint_at(AT_FDCWD, name, lookup_flags, &path);
if (retval) if (retval)
goto out; goto out;