From: Eric Blake Date: Tue, 21 May 2013 02:30:30 +0000 (-0600) Subject: cgroup: be robust against cgroup movement races, part 2 X-Git-Tag: v0.10.2.6~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05bfbdba00af5f319ef2c4d82185873e5de041c1;p=thirdparty%2Flibvirt.git cgroup: be robust against cgroup movement races, part 2 The previous commit was an incomplete backport of commit 83e4c775, and as a result made any attempt to start a domain when cgroups are enabled go into an infinite loop. This fixes the botched backport. Signed-off-by: Eric Blake --- diff --git a/src/util/cgroup.c b/src/util/cgroup.c index b1280c0035..778a52ed09 100644 --- a/src/util/cgroup.c +++ b/src/util/cgroup.c @@ -897,6 +897,8 @@ int virCgroupMoveTask(virCgroupPtr src_group, virCgroupPtr dest_group, rc = virCgroupGetValueStr(src_group, controller, "tasks", &content); if (rc != 0) return rc; + if (!*content) + break; rc = virCgroupAddTaskStrController(dest_group, content, controller); if (rc != 0)