aboutsummaryrefslogtreecommitdiffstats
path: root/fs/pnode.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-01-15 17:49:25 +0000
committerZiyan <jaraidaniel@gmail.com>2016-10-29 01:34:21 +0200
commitd478a9dac767ad4e3c2e2dd3d141c6165387a117 (patch)
tree288aa0513b7d32edfbe3bfd2fbe2727c94a17258 /fs/pnode.h
parent8ea971b495ee5a2bfe8f25f13db10c10dfda0875 (diff)
downloadkernel_samsung_tuna-d478a9dac767ad4e3c2e2dd3d141c6165387a117.zip
kernel_samsung_tuna-d478a9dac767ad4e3c2e2dd3d141c6165387a117.tar.gz
kernel_samsung_tuna-d478a9dac767ad4e3c2e2dd3d141c6165387a117.tar.bz2
vfs: new internal helper: mnt_has_parent(mnt)
vfsmounts have ->mnt_parent pointing either to a different vfsmount or to itself; it's never NULL and termination condition in loops traversing the tree towards root is mnt == mnt->mnt_parent. At least one place (see the next patch) is confused about what's going on; let's add an explicit helper checking it right way and use it in all places where we need it. Not that there had been too many, but... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> (cherry picked from commit b2dba1af3c4157040303a76d25216b1713d333d0) CVE-2014-7970 BugLink: http://bugs.launchpad.net/bugs/1383356 Signed-off-by: Luis Henriques <luis.henriques@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Acked-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andy Whitcroft <apw@canonical.com> Change-Id: Iaa5ab510804f3b17fe71197b8919d663a416bf05
Diffstat (limited to 'fs/pnode.h')
-rw-r--r--fs/pnode.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/pnode.h b/fs/pnode.h
index 3b6eae3..c3cefc7 100644
--- a/fs/pnode.h
+++ b/fs/pnode.h
@@ -9,7 +9,7 @@
#define _LINUX_PNODE_H
#include <linux/list.h>
-#include <linux/mount.h>
+#include "mount.h"
#define IS_MNT_SHARED(mnt) (mnt->mnt_flags & MNT_SHARED)
#define IS_MNT_SLAVE(mnt) (mnt->mnt_master)