diff options
author | David S. Miller <davem@davemloft.net> | 2021-03-25 23:31:22 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-25 23:31:22 +0100 |
commit | efd13b71a3fa31413f8d15342e01d44b60b0a432 (patch) | |
tree | 2ed1b299e25538c5a60485a1047507b49d3e0ecf /fs/cachefiles/bind.c | |
parent | hinic: avoid gcc -Wrestrict warning (diff) | |
parent | Merge branch 'akpm' (patches from Andrew) (diff) | |
download | linux-efd13b71a3fa31413f8d15342e01d44b60b0a432.tar.xz linux-efd13b71a3fa31413f8d15342e01d44b60b0a432.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/cachefiles/bind.c')
-rw-r--r-- | fs/cachefiles/bind.c | 6 |
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) || |