mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 13:51:44 +00:00
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>
This commit is contained in:
parent
0f7ff2dabb
commit
2788cc47f4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user