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

Submitted by Mike Rapoport on Dec. 5, 2018, 3:21 p.m.

Details

Message ID 1544023261-25524-2-git-send-email-rppt@linux.ibm.com
State Accepted
Series "lazy migration fixes"
Headers show

Commit Message

Mike Rapoport Dec. 5, 2018, 3:21 p.m.
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@linux.ibm.com>
---
 criu/cr-dump.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

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)