diff --git a/fs/namespace.c b/fs/namespace.c index b682a044cf0e169f2a1b9ee47836fefdb31e6e31..ef1398d176c66285eba98985a751326689cf57e3 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -2210,6 +2210,10 @@ static int do_change_type(struct path *path, int ms_flags) return -EINVAL; namespace_lock(); + if (!check_mnt(mnt)) { + err = -EINVAL; + goto out_unlock; + } if (type == MS_SHARED) { err = invent_group_ids(mnt, recurse); if (err)