numactl/0002-shm.c-fix-verify_shm-memcmp-nodes.patch

29 lines
914 B
Diff

From 24d434c209cb337ea4e32c44c100f1d2e69df74e Mon Sep 17 00:00:00 2001
From: Paul Tohmas <relpeace@yeah.net>
Date: Thu, 7 Dec 2023 10:38:52 +0800
Subject: [PATCH] shm.c: fix verify_shm memcmp nodes
When nodemask_sz is large 64 (CONFIG_NODES_SHIFT > 6), verify_shm
will output wrong result "mismatched node mask". that's not what we
expected, we expected compare nodes->maskp.
---
shm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/shm.c b/shm.c
index d5c9828..15f4892 100644
--- a/shm.c
+++ b/shm.c
@@ -292,7 +292,7 @@ void verify_shm(int policy, struct bitmask *nodes)
policy_name(pol2), policy_name(policy));
return;
}
- if (memcmp(nodes2, nodes, numa_bitmask_nbytes(nodes))) {
+ if (memcmp(nodes2->maskp, nodes->maskp, numa_bitmask_nbytes(nodes))) {
vwarn(p, "mismatched node mask\n");
printmask("expected", nodes);
printmask("real", nodes2);
--
2.20.1