[4.2.y-ckt stable] Patch "Don't reset ->total_link_count on nested calls of vfs_path_lookup()" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Fri Jan 15 18:30:10 UTC 2016


This is a note to let you know that I have just added a patch titled

    Don't reset ->total_link_count on nested calls of vfs_path_lookup()

to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue

This patch is scheduled to be released in version 4.2.8-ckt2.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

---8<------------------------------------------------------------

>From 69287de654b5fdf3ca015aa997436032787ec78d Mon Sep 17 00:00:00 2001
From: Al Viro <viro at zeniv.linux.org.uk>
Date: Sun, 6 Dec 2015 12:33:02 -0500
Subject: Don't reset ->total_link_count on nested calls of vfs_path_lookup()

commit 2788cc47f4593cca2c3c73c7bb82cd32b88c8ef7 upstream.

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.

Signed-off-by: Al Viro <viro at zeniv.linux.org.uk>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 fs/namei.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/namei.c b/fs/namei.c
index 36df481..f39a798 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1999,7 +1999,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;
--
1.9.1





More information about the kernel-team mailing list