aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-12-13 02:30:23 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-12-13 02:30:23 +0100
commit2ecd9abf516e5e4afc482eb0329f9304aed285b4 (patch)
treea2980c05f50df82d6d043e4e44ecaf2023220870 /fs/namespace.c
parent698f3e8de2f0104dc80402ea151aae73b946a2d9 (diff)
parenta04b065c010280ed1806c73cb234a2bf657a5ce9 (diff)
downloadkernel_samsung_smdk4412-2ecd9abf516e5e4afc482eb0329f9304aed285b4.zip
kernel_samsung_smdk4412-2ecd9abf516e5e4afc482eb0329f9304aed285b4.tar.gz
kernel_samsung_smdk4412-2ecd9abf516e5e4afc482eb0329f9304aed285b4.tar.bz2
Merge branch 'cm-13.0' of https://github.com/CyanogenMod/android_kernel_samsung_smdk4412 into replicant-6.0
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 900812f..8b34a97 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1477,8 +1477,14 @@ struct vfsmount *collect_mounts(struct path *path)
{
struct vfsmount *tree;
down_write(&namespace_sem);
- tree = copy_tree(path->mnt, path->dentry, CL_COPY_ALL | CL_PRIVATE);
+ if (!check_mnt(path->mnt))
+ tree = ERR_PTR(-EINVAL);
+ else
+ tree = copy_tree(path->mnt, path->dentry,
+ CL_COPY_ALL | CL_PRIVATE);
up_write(&namespace_sem);
+ if (IS_ERR(tree))
+ return NULL;
return tree;
}