Skip to content

Commit

Permalink
Don't reset ->total_link_count on nested calls of vfs_path_lookup()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Al Viro committed Dec 6, 2015
1 parent 0f7ff2d commit 2788cc4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2788cc4

Please sign in to comment.