author: Al Viro <viro@zeniv.linux.org.uk> 2019-05-13 12:57:22 -0400
committer: Al Viro <viro@zeniv.linux.org.uk> 2019-05-25 18:00:02 -0400
commit: c3aabf0780a506225b53bfe2b5177dd5dfec093d
parent: 059338aae33165179352a26b58d815801072c87d
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 0 deletions
diff --git a/fs/fsopen.c b/fs/fsopen.c
index c2891e933ef1..390172772f55 100644
--- a/fs/fsopen.c
+++ b/fs/fsopen.c
@@ -230,6 +230,8 @@ static int vfs_fsconfig_locked(struct fs_context *fc, int cmd,
case FSCONFIG_CMD_CREATE:
if (fc->phase != FS_CONTEXT_CREATE_PARAMS)
return -EBUSY;
+ if (!mount_capable(fc))
+ return -EPERM;
fc->phase = FS_CONTEXT_CREATING;
ret = vfs_get_tree(fc);
if (ret)