[CRIU] [PATCH] restore: fix index for accessing entries of the parent_act array

Andrey Vagin avagin at openvz.org
Thu Aug 7 06:27:20 PDT 2014


SIGMAX is a valid value, but the 0 signal doesn't exist.

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 cr-restore.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cr-restore.c b/cr-restore.c
index 1b538e1..56ff90a 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -682,7 +682,7 @@ static int prepare_sigactions(void)
 			continue;
 		}
 
-		if (sa_inherited(sig, &act))
+		if (sa_inherited(sig - 1, &act))
 			continue;
 
 		/*
@@ -695,7 +695,7 @@ static int prepare_sigactions(void)
 			goto err;
 		}
 
-		parent_act[sig] = act;
+		parent_act[sig - 1] = act;
 		rst++;
 	}
 
-- 
1.8.5.3



More information about the CRIU mailing list