From 05bfbdba00af5f319ef2c4d82185873e5de041c1 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 20 May 2013 20:30:30 -0600 Subject: [PATCH] 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 --- src/util/cgroup.c | 2 ++ 1 file changed, 2 insertions(+) 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)