diff options
author | Linus Torvalds | 2020-12-25 10:54:29 -0800 |
---|---|---|
committer | Linus Torvalds | 2020-12-25 10:54:29 -0800 |
commit | 7bb5226c8a4bbf26a9ededc90532b0ad539d2017 (patch) | |
tree | 73ddf0d8db109a3b14710269630366fa68290317 /fs/namei.c | |
parent | 71c5f03154ac1cb27423b984743ccc2f5d11d14d (diff) | |
parent | 2e2cbaf920d14de9a96180ddefd6861bcc46f07d (diff) |
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc vfs updates from Al Viro:
"Assorted patches from previous cycle(s)..."
* 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
fix hostfs_open() use of ->f_path.dentry
Make sure that make_create_in_sticky() never sees uninitialized value of dir_mode
fs: Kill DCACHE_DONTCACHE dentry even if DCACHE_REFERENCED is set
fs: Handle I_DONTCACHE in iput_final() instead of generic_drop_inode()
fs/namespace.c: WARN if mnt_count has become negative
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c index 03d0e11e4f36..78443a85480a 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2114,8 +2114,10 @@ static int link_path_walk(const char *name, struct nameidata *nd) return PTR_ERR(name); while (*name=='/') name++; - if (!*name) + if (!*name) { + nd->dir_mode = 0; // short-circuit the 'hardening' idiocy return 0; + } /* At this point we know we have a real path component. */ for(;;) { |