diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2015-06-08 10:11:46 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2015-06-08 10:11:46 +0200 |
commit | 17b63cad14be4b3b407451da0e10a688b67b0c83 (patch) | |
tree | d3ce41b603d1de3d7c710ef9c515de70441b6cd4 /fs/namespace.c | |
parent | afd1ef6b14dd6ba9d2f0d09f99a21c610a2d2c09 (diff) | |
parent | be4cb235441a691ee63ba5e00843a9c210be5b8a (diff) |
Merge tag 'v4.0.5' into toradex_vf_4.0-next
This is the 4.0.5 stable release
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 38ed1e1bed41..13b0f7bfc096 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1709,8 +1709,11 @@ struct vfsmount *collect_mounts(struct path *path) { struct mount *tree; namespace_lock(); - tree = copy_tree(real_mount(path->mnt), path->dentry, - CL_COPY_ALL | CL_PRIVATE); + if (!check_mnt(real_mount(path->mnt))) + tree = ERR_PTR(-EINVAL); + else + tree = copy_tree(real_mount(path->mnt), path->dentry, + CL_COPY_ALL | CL_PRIVATE); namespace_unlock(); if (IS_ERR(tree)) return ERR_CAST(tree); |