summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-12-06 18:33:02 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2015-12-06 18:33:02 +0100
commit2788cc47f4593cca2c3c73c7bb82cd32b88c8ef7 (patch)
tree09b9de3f1e714873e1cfb947257c2de5a1040f5f
parentovl: get rid of the dead code left from broken (and disabled) optimizations (diff)
downloadlinux-2788cc47f4593cca2c3c73c7bb82cd32b88c8ef7.tar.xz
linux-2788cc47f4593cca2c3c73c7bb82cd32b88c8ef7.zip
Don't reset ->total_link_count on nested calls of vfs_path_lookup()
we already zero it on outermost set_nameidata(), so initialization in path_init() is pointless and wrong. The same DoS exists on pre-4.2 kernels, but there a slightly different fix will be needed. Cc: stable@vger.kernel.org # v4.2 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/namei.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c
index d84d7c7515fc..0c3974cd3ecd 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1996,7 +1996,6 @@ static const char *path_init(struct nameidata *nd, unsigned flags)
nd->last_type = LAST_ROOT; /* if there are only slashes... */
nd->flags = flags | LOOKUP_JUMPED | LOOKUP_PARENT;
nd->depth = 0;
- nd->total_link_count = 0;
if (flags & LOOKUP_ROOT) {
struct dentry *root = nd->root.dentry;
struct inode *inode = root->d_inode;