[CRIU] [PATCH] criu: cgroup -- Don't use PAGE_SIZE inside parasite args
Cyrill Gorcunov
gorcunov at openvz.org
Wed Feb 24 23:18:30 PST 2016
This cause problem on ppc64
| gcc -c -O2 -g -Wall -Werror -DCONFIG_PPC64 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
| -fno-strict-aliasing -iquote /home/cyrill/criu/criu/include -iquote /home/cyrill/criu/images
| -iquote /home/cyrill/criu/criu/pie -iquote /home/cyrill/criu/criu/arch/ppc64
| -iquote /home/cyrill/criu/criu/arch/ppc64/include -iquote /home/cyrill/criu/ -I/usr/include/libnl3
| -iquote ppc64 -DCONFIG_PPC64 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE parasite-syscall.c -o parasite-syscall.o
| parasite-syscall.c: In function ‘parasite_dump_cgroup’:
| parasite-syscall.c:1283:2: error: size of unnamed array is negative
| ca = parasite_args(ctl, struct parasite_dump_cgroup_args);
| ^
| /home/cyrill/criu/scripts/nmk/scripts/rules.mk:53: recipe for target 'parasite-syscall.o' failed
Just use size parasite known to support.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
criu/include/parasite.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/criu/include/parasite.h b/criu/include/parasite.h
index e3383d802d78..6ca56f7c36e4 100644
--- a/criu/include/parasite.h
+++ b/criu/include/parasite.h
@@ -247,13 +247,12 @@ struct parasite_tty_args {
};
struct parasite_dump_cgroup_args {
- /* We choose PAGE_SIZE here since that's how big parasite messages are,
- * although this is probably longer than any /proc/pid/cgroup file will
- * ever be on most systems (4k).
+ /*
+ * 4K should be enough for most cases.
*
* The string is null terminated.
*/
- char contents[PAGE_SIZE];
+ char contents[PARASITE_ARG_SIZE_MIN];
};
/* the parasite prefix is added by gen_offsets.sh */
--
2.5.0
More information about the CRIU
mailing list