aboutsummaryrefslogtreecommitdiffstats
path: root/fs/quota/dquot.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2016-07-05 10:41:57 -0500
committerEric W. Biederman <ebiederm@xmission.com>2016-07-05 15:12:39 -0500
commit5c0048280babd579fa9e5f0e787122b06aee3f3b (patch)
tree9e24c77e8f6a9484f67592fab164e14931caffd4 /fs/quota/dquot.c
parentquota: Handle quota data stored in s_user_ns in quota_setxquota (diff)
downloadlinux-dev-5c0048280babd579fa9e5f0e787122b06aee3f3b.tar.xz
linux-dev-5c0048280babd579fa9e5f0e787122b06aee3f3b.zip
dquot: For now explicitly don't support filesystems outside of init_user_ns
Mostly supporting filesystems outside of init_user_ns is s/&init_usre_ns/dquot->dq_sb->s_user_ns/. An actual need for supporting quotas on filesystems outside of s_user_ns is quite a ways away and to be done responsibily needs an audit on what can happen with hostile quota files. Until that audit is complete don't attempt to support quota files on filesystems outside of s_user_ns. Cc: Jan Kara <jack@suse.cz> Acked-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/quota/dquot.c')
-rw-r--r--fs/quota/dquot.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 74706b6aa747..87197d13cc76 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -2271,6 +2271,11 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id,
error = -EINVAL;
goto out_fmt;
}
+ /* Filesystems outside of init_user_ns not yet supported */
+ if (sb->s_user_ns != &init_user_ns) {
+ error = -EINVAL;
+ goto out_fmt;
+ }
/* Usage always has to be set... */
if (!(flags & DQUOT_USAGE_ENABLED)) {
error = -EINVAL;