[CRIU] [PATCH 1/5] cgroup props parser: allow empty property lists
Tycho Andersen
tycho.andersen at canonical.com
Mon Jun 6 08:20:13 PDT 2016
We'll use this in the next patchset where we want to dump global properties
of the freezer cgroup, but none of the special ones for this cgroup,
because they're handled separately.
Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
CC: Cyrill Gorcunov <gorcunov at openvz.org>
---
criu/cgroup-props.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/criu/cgroup-props.c b/criu/cgroup-props.c
index 8368a1d..bbb8d78 100644
--- a/criu/cgroup-props.c
+++ b/criu/cgroup-props.c
@@ -335,6 +335,11 @@ static int cgp_parse_stream(char *stream, size_t len)
}
}
+ if (cgp_entry->cgp.nr_props == 0 && !eat_symbol(&stream, &len, ']', true)) {
+ pr_err("Expected ']' in empty property list for %s\n", cgp_entry->cgp.name);
+ goto err_parse;
+ }
+
if (!eat_symbol(&stream, &len, '\n', true) && len) {
pr_err("Expected \'\\n\' symbol in controller's %s stream\n",
cgp_entry->cgp.name);
--
2.7.4
More information about the CRIU
mailing list