[CRIU] [PATCH 1/2] dump: lazy-migration: don't try to cleanup zombie processes

Mike Rapoport rppt at linux.ibm.com
Wed Dec 5 18:21:00 MSK 2018


The lazy memory dump used by the post copy migration cleans up page pipes
and parasite from zombie tasks, although for such task they are never
initialized.
Fix it.

Signed-off-by: Mike Rapoport <rppt at linux.ibm.com>
---
 criu/cr-dump.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/criu/cr-dump.c b/criu/cr-dump.c
index 2c87054..cf1e303 100644
--- a/criu/cr-dump.c
+++ b/criu/cr-dump.c
@@ -1641,8 +1641,10 @@ static int cr_lazy_mem_dump(void)
 	ret = cr_page_server(false, true, -1);
 
 	for_each_pstree_item(item) {
-		destroy_page_pipe(dmpi(item)->mem_pp);
-		compel_cure_local(dmpi(item)->parasite_ctl);
+		if (item->pid->state != TASK_DEAD) {
+			destroy_page_pipe(dmpi(item)->mem_pp);
+			compel_cure_local(dmpi(item)->parasite_ctl);
+		}
 	}
 
 	if (ret)
-- 
2.7.4



More information about the CRIU mailing list