Commit 05678637 authored by Pavel Emelyanov's avatar Pavel Emelyanov

pie: Split parasite_fini into pieces

Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 0e1cce76
...@@ -662,14 +662,19 @@ static noinline void fini_sigreturn(unsigned long new_sp) ...@@ -662,14 +662,19 @@ static noinline void fini_sigreturn(unsigned long new_sp)
ARCH_RT_SIGRETURN(new_sp); ARCH_RT_SIGRETURN(new_sp);
} }
static int fini(void) static void parasite_cleanup(void)
{ {
unsigned long new_sp;
if (mprotect_args) { if (mprotect_args) {
mprotect_args->add_prot = 0; mprotect_args->add_prot = 0;
mprotect_vmas(mprotect_args); mprotect_vmas(mprotect_args);
} }
}
static int fini(void)
{
unsigned long new_sp;
parasite_cleanup();
new_sp = (long)sigframe + RT_SIGFRAME_OFFSET(sigframe); new_sp = (long)sigframe + RT_SIGFRAME_OFFSET(sigframe);
pr_debug("%ld: new_sp=%lx ip %lx\n", sys_gettid(), pr_debug("%ld: new_sp=%lx ip %lx\n", sys_gettid(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment