[CRIU] [PATCH 3/3] pstree: set ids for helpers
Andrey Vagin
avagin at openvz.org
Sat Nov 14 22:07:05 PST 2015
From: Andrew Vagin <avagin at virtuozzo.com>
It can be the same with a parent one and the helper will inherit all
parent resources.
Now we can dereference item->ids for all task. It's used in
restore_task_mnt_ns, for example.
Reported-by: Mr Jenkins
Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
pstree.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pstree.c b/pstree.c
index 18e5a8e..d96da44 100644
--- a/pstree.c
+++ b/pstree.c
@@ -478,6 +478,7 @@ static int prepare_pstree_ids(void)
helper->pgid = item->sid;
helper->pid.virt = item->sid;
helper->parent = root_item;
+ helper->ids = root_item->ids;
list_add_tail(&helper->sibling, &helpers);
pr_info("Add a helper %d for restoring SID %d\n",
@@ -596,6 +597,7 @@ static int prepare_pstree_ids(void)
helper->pgid = item->pgid;
helper->pid.virt = item->pgid;
helper->parent = item;
+ helper->ids = item->ids;
list_add(&helper->sibling, &item->children);
rsti(item)->pgrp_leader = helper;
--
2.4.3
More information about the CRIU
mailing list