2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 13:58:34 +00:00

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: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin
2013-09-30 18:46:50 +04:00
committed by Pavel Emelyanov
parent 3f1aeb2c86
commit 6b31a75a68

View File

@@ -754,6 +754,12 @@ static int parasite_fini_seized(struct parasite_ctl *ctl)
if (parasite_stop_on_syscall(1, __NR_rt_sigreturn)) if (parasite_stop_on_syscall(1, __NR_rt_sigreturn))
return -1; 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; return 0;
} }