[CRIU] [PATCH 7/7] compel: Fetch thread sas in compel_prepare_thread
Cyrill Gorcunov
gorcunov at openvz.org
Mon Mar 13 09:52:19 PDT 2017
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
compel/src/lib/infect.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/compel/src/lib/infect.c b/compel/src/lib/infect.c
index 72de801acbd7..2663b9329471 100644
--- a/compel/src/lib/infect.c
+++ b/compel/src/lib/infect.c
@@ -937,6 +937,12 @@ struct parasite_thread_ctl *compel_prepare_thread(struct parasite_ctl *ctl, int
} else {
tctl->tid = pid;
tctl->ctl = ctl;
+
+ if (arch_fetch_sas(ctl, ctl->r_thread_sas)) {
+ xfree(tctl);
+ tctl = NULL;
+ } else
+ memcpy(&tctl->sas, ctl->thread_sas, sizeof(tctl->sas));
}
}
--
2.7.4
More information about the CRIU
mailing list