|
@@ -1669,8 +1669,11 @@ struct vfsmount *collect_mounts(struct path *path)
|
|
{
|
|
{
|
|
struct mount *tree;
|
|
struct mount *tree;
|
|
namespace_lock();
|
|
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();
|
|
namespace_unlock();
|
|
if (IS_ERR(tree))
|
|
if (IS_ERR(tree))
|
|
return ERR_CAST(tree);
|
|
return ERR_CAST(tree);
|