On (08/01/18 16:25), David Howells wrote: [..] > @@ -2460,18 +2428,41 @@ static int do_remount(struct path *path, int ms_flags, int sb_flags, > if (!can_change_locked_flags(mnt, mnt_flags)) > return -EPERM; > > - err = security_sb_remount(sb, data, data_size); > - if (err) > - return err; > + if (type->init_fs_context) { > + fc = vfs_sb_reconfig(path, sb_flags); > + if (IS_ERR(fc)) > + return PTR_ERR(fc); > + > + err = parse_monolithic_mount_data(fc, data, data_size); > + if (err < 0) > + goto err_fc; > + > + if (fc->ops->validate) { > + err = fc->ops->validate(fc); > + if (err < 0) > + goto err_fc; > + } > + > + err = security_fs_context_validate(fc); > + if (err) > + return err; goto err_fc? > + } else { > + err = security_sb_remount(sb, data, data_size); > + if (err) > + return err; > + } goto err_fc? -ss