[CRIU] [PATCH] zdtm: ipc_namespace: Bound min/max for mqueue/msg_max
Cyrill Gorcunov
gorcunov at openvz.org
Tue Mar 5 14:12:58 EST 2013
Otherwise
| 11:03:13.524: 19446: ERR: ipc_namespace.c:212: Can't write 0 into /proc/sys/fs/mqueue/msg_max (errno = 22 (Invalid argument))
| 11:03:13.524: 19446: ERR: ipc_namespace.c:273: Failed to randomize ipc namespace tunables (errno = 22 (Invalid argument))
| 11:03:13.524: 19446: ERR: ipc_namespace.c:336: Failed to randomize ipc ns before migration (errno = 22 (Invalid argument))
| 11:03:13.527: 19445: ERR: test.c:298: Test exited with unexpectedly with code 1 (errno = 4 (Interrupted system call))
https://bugzilla.openvz.org/show_bug.cgi?id=2530
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
test/zdtm/live/static/ipc_namespace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/zdtm/live/static/ipc_namespace.c b/test/zdtm/live/static/ipc_namespace.c
index b660efc..872dea7 100644
--- a/test/zdtm/live/static/ipc_namespace.c
+++ b/test/zdtm/live/static/ipc_namespace.c
@@ -265,7 +265,7 @@ static int rand_ipc_ns(void)
if (!ret)
ret = rand_ipc_sysctl("/proc/sys/fs/mqueue/queues_max", (((unsigned)lrand48()) % 1023) + 1);
if (!ret)
- ret = rand_ipc_sysctl("/proc/sys/fs/mqueue/msg_max", (unsigned)lrand48() & (32768 * sizeof(void)/4 - 1));
+ ret = rand_ipc_sysctl("/proc/sys/fs/mqueue/msg_max", ((unsigned)lrand48() % 65536) + 1);
if (!ret)
ret = rand_ipc_sysctl("/proc/sys/fs/mqueue/msgsize_max", ((unsigned)lrand48() & (8192 * 128 - 1)) | 128);
--
1.8.1.2
More information about the CRIU
mailing list