[CRIU] [PATCH 09/22] parasite: Initialize @cmd/ack in init_thread

Andrey Vagin avagin at openvz.org
Wed May 8 09:28:36 EDT 2013


From: Cyrill Gorcunov <gorcunov at openvz.org>

To not fail if one day PARASITE_CMD_IDLE become
non equal to zero.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 pie/parasite.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pie/parasite.c b/pie/parasite.c
index 972d9a5..2ce7616 100644
--- a/pie/parasite.c
+++ b/pie/parasite.c
@@ -242,6 +242,9 @@ static int init_thread(struct parasite_init_args *args)
 	tid_state[next_tid_state].tid = sys_gettid();
 	tid_state[next_tid_state].real = args->real;
 
+	futex_set(&tid_state[next_tid_state].cmd, PARASITE_CMD_IDLE);
+	futex_set(&tid_state[next_tid_state].ack, PARASITE_CMD_IDLE);
+
 	hash_thread_state(&tid_state[next_tid_state]);
 
 	next_tid_state++;
-- 
1.8.2



More information about the CRIU mailing list