[CRIU] [PATCH] pstree: Don't try to generate clone mask for root task

Cyrill Gorcunov gorcunov at openvz.org
Thu Mar 14 09:47:17 EDT 2013


Otherwise shared_fdt_prepare may do a nil dereference.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 pstree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pstree.c b/pstree.c
index e5088f8..8f87331 100644
--- a/pstree.c
+++ b/pstree.c
@@ -497,7 +497,7 @@ static int prepare_pstree_kobj_ids(void)
 		else
 			ids = root_ids;
 
-		if (!ids) {
+		if (!ids || ids == root_ids) {
 			cflags = opts.rst_namespaces_flags;
 			goto set_mask;
 		}
-- 
1.8.1.4



More information about the CRIU mailing list