summaryrefslogtreecommitdiff
path: root/fs/cachefiles/bind.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2021-03-29 10:39:10 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-03-29 10:39:10 -0300
commitb0a752d43b1566451332bcb5b52b9694dfe7896c (patch)
tree1d5ea27a0ef6e74e2b9692e6c02d8d48710d1d36 /fs/cachefiles/bind.c
parent50fa3a531e8e4b58550171fb159d0aa578c6b52d (diff)
parenta5e13c6df0e41702d2b2c77c8ad41677ebb065b3 (diff)
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick up fixes sent via perf/urgent and in the BPF tools/ directories. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'fs/cachefiles/bind.c')
-rw-r--r--fs/cachefiles/bind.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/cachefiles/bind.c b/fs/cachefiles/bind.c
index dfb14dbddf51..38bb7764b454 100644
--- a/fs/cachefiles/bind.c
+++ b/fs/cachefiles/bind.c
@@ -118,6 +118,12 @@ static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache)
cache->mnt = path.mnt;
root = path.dentry;
+ ret = -EINVAL;
+ if (mnt_user_ns(path.mnt) != &init_user_ns) {
+ pr_warn("File cache on idmapped mounts not supported");
+ goto error_unsupported;
+ }
+
/* check parameters */
ret = -EOPNOTSUPP;
if (d_is_negative(root) ||