Skip to content

Commit 2788cc4

Browse files
author
Al Viro
committed
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>
1 parent 0f7ff2d commit 2788cc4

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

fs/namei.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1996,7 +1996,6 @@ static const char *path_init(struct nameidata *nd, unsigned flags)
19961996
nd->last_type = LAST_ROOT; /* if there are only slashes... */
19971997
nd->flags = flags | LOOKUP_JUMPED | LOOKUP_PARENT;
19981998
nd->depth = 0;
1999-
nd->total_link_count = 0;
20001999
if (flags & LOOKUP_ROOT) {
20012000
struct dentry *root = nd->root.dentry;
20022001
struct inode *inode = root->d_inode;

0 commit comments

Comments
 (0)