Commit e30f45d3 authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov

cgroup props parser: allow empty property lists

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: 's avatarTycho Andersen <tycho.andersen@canonical.com>
CC: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent d5095c00
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment