[CRIU] [PATCH] pie: restorer -- Don't fail if no futex provided

Cyrill Gorcunov gorcunov at openvz.org
Thu Mar 28 14:28:50 EDT 2013


The image data may have no futex provided but we have
no "optional" entry for that (because futex data is
a part of thread_core_entry message).

Still we know that futex length can't be zero thus
make it "optional" by a value -- if length is zero,
we consider it as a sign to skip.

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

diff --git a/pie/restorer.c b/pie/restorer.c
index 400dcb4..e4d65c5 100644
--- a/pie/restorer.c
+++ b/pie/restorer.c
@@ -205,7 +205,7 @@ static int restore_thread_common(struct rt_sigframe *sigframe,
 {
 	sys_set_tid_address((int *)decode_pointer(args->clear_tid_addr));
 
-	if (args->has_futex) {
+	if (args->has_futex && args->futex_rla_len) {
 		int ret;
 
 		ret = sys_set_robust_list(decode_pointer(args->futex_rla),
-- 
1.8.1.4



More information about the CRIU mailing list