Commit 6b31a75a authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

parasite: add a comment why we can safly trap task on sigreturn

The kernel notifies about leaving syscall before starting to deliver
signals. If you don't believe me, pls look at arch/x86/kernel/entry_64.S:

int_ret_from_sys_call
        syscall_trace_leave
        do_notify_resume
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 3f1aeb2c
......@@ -754,6 +754,12 @@ static int parasite_fini_seized(struct parasite_ctl *ctl)
if (parasite_stop_on_syscall(1, __NR_rt_sigreturn))
return -1;
/*
* All signals are unblocked now. The kernel notifies about leaving
* syscall before starting to deliver signals. All parasite code are
* executed with blocked signals, so we can sefly unmap a parasite blob.
*/
return 0;
}
......
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