[Devel] [PATCH hci-8.1 v2 3/4] shmem: reject the mpol= mount option in VE
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Nov 6 17:01:34 MSK 2026
A CT is meant to see a kernel without NUMA support, so the NUMA API
syscalls return -ENOSYS in a non-super VE. The tmpfs mpol= mount option
still lets a CT set a NUMA memory policy for all files of a tmpfs
mount.
Reject mpol= in a non-super VE the way a kernel built without
CONFIG_NUMA does: the mount fails with -EINVAL and "Unsupported
parameter 'mpol'".
https://virtuozzo.atlassian.net/browse/VSTOR-153679
Feature: mm: prohibit NUMA API inside CT
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
mm/shmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/shmem.c b/mm/shmem.c
index f8cea7e5de88d..8862723003fb0 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -4378,7 +4378,7 @@ static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param)
ctx->seen |= SHMEM_SEEN_HUGE;
break;
case Opt_mpol:
- if (IS_ENABLED(CONFIG_NUMA)) {
+ if (IS_ENABLED(CONFIG_NUMA) && ve_is_super(get_exec_env())) {
mpol_put(ctx->mpol);
ctx->mpol = NULL;
if (mpol_parse_str(param->string, &ctx->mpol))
--
2.43.0
More information about the Devel
mailing list