[CRIU] [PATCH 1/2 v2] rst: Deprecate no ids.img case

Pavel Emelyanov xemul at virtuozzo.com
Mon Apr 4 04:35:57 PDT 2016


We've been writing this file since 0.4, hopefully nobody's
using such an oldie :)

v2: Don't BUG_ON, but return error, as this can be triggered
by corrupting images.

Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>

---
 criu/pstree.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/criu/pstree.c b/criu/pstree.c
index c3ea274..b49c9a0 100644
--- a/criu/pstree.c
+++ b/criu/pstree.c
@@ -799,8 +799,9 @@ static int prepare_pstree_kobj_ids(void)
 
 		if (!item->ids) {
 			if (item == root_item) {
-				cflags = opts.rst_namespaces_flags;
-				goto set_mask;
+				pr_err("No IDS for root task.\n");
+				pr_err("Images currupted or too old criu was used for dump.\n");
+				return -1;
 			}
 
 			continue;
@@ -840,7 +841,6 @@ static int prepare_pstree_kobj_ids(void)
 				return ret;
 		}
 
-set_mask:
 		rsti(item)->clone_flags = cflags;
 		if (parent)
 			/*
-- 
2.5.0



More information about the CRIU mailing list