mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +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:
parent
3f1aeb2c86
commit
6b31a75a68
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user