From: Al Viro Date: Thu, 20 Dec 2018 08:16:27 +0000 (-0500) Subject: mount_fs: suppress MAC on MS_SUBMOUNT as well as MS_KERNMOUNT X-Git-Tag: v5.0-rc1~28^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=718c43038f287e843c2f63d946977de90014cb11;p=linux-2.6-block.git mount_fs: suppress MAC on MS_SUBMOUNT as well as MS_KERNMOUNT Reviewed-by: David Howells Signed-off-by: Al Viro --- diff --git a/fs/super.c b/fs/super.c index a5511c4ba69b..48e25eba8465 100644 --- a/fs/super.c +++ b/fs/super.c @@ -1277,7 +1277,7 @@ mount_fs(struct file_system_type *type, int flags, const char *name, void *data) if (error) goto out_sb; - if (!(flags & MS_KERNMOUNT)) { + if (!(flags & (MS_KERNMOUNT|MS_SUBMOUNT))) { error = security_sb_kern_mount(sb); if (error) goto out_sb;