[CRIU] [PATCH 66/78] pie: Split parasite_fini into pieces
Cyrill Gorcunov
gorcunov at openvz.org
Mon Nov 7 08:36:51 PST 2016
From: Pavel Emelyanov <xemul at virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
criu/pie/parasite.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/criu/pie/parasite.c b/criu/pie/parasite.c
index 57d3ae148330..7c016883b97b 100644
--- a/criu/pie/parasite.c
+++ b/criu/pie/parasite.c
@@ -611,14 +611,19 @@ static noinline void fini_sigreturn(unsigned long new_sp)
ARCH_RT_SIGRETURN(new_sp, sigframe);
}
-static int fini(void)
+static void parasite_cleanup(void)
{
- unsigned long new_sp;
-
if (mprotect_args) {
mprotect_args->add_prot = 0;
mprotect_vmas(mprotect_args);
}
+}
+
+static int fini(void)
+{
+ unsigned long new_sp;
+
+ parasite_cleanup();
new_sp = (long)sigframe + RT_SIGFRAME_OFFSET(sigframe);
pr_debug("%ld: new_sp=%lx ip %lx\n", sys_gettid(),
--
2.7.4
More information about the CRIU
mailing list