[CRIU] [PATCH] restore: clear breakpoints only for alive tasks

Andrey Vagin avagin at openvz.org
Fri Oct 10 14:14:49 PDT 2014


We don't set breakpoints for zombies.

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 cr-restore.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cr-restore.c b/cr-restore.c
index c8cb428..d046f4b 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -1591,9 +1591,12 @@ static int clear_breakpoints()
 	struct pstree_item *item;
 	int ret = 0, i;
 
-	for_each_pstree_item(item)
+	for_each_pstree_item(item) {
+		if (!task_alive(item))
+			continue;
 		for (i = 0; i < item->nr_threads; i++)
 			ret |= ptrace_flush_breakpoints(item->threads[i].real);
+	}
 
 	return ret;
 }
-- 
1.9.3



More information about the CRIU mailing list