Commit cda7d6b2 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Andrei Vagin

restorer: unblock only SIGCHLD previously blocked in criu

The purpose is to unblock previously blocked SIGCHLD, not all the
signals. IIRC, this block-unblock dancing is about a race where SIGCHLD
may come during switching to restorer blob, where CRIU handler function
is already unmapped - which will result in segmentation violation if
SIGCHLD wasn't blocked.

Fixes:3a61c38a ("restore: block sigchld to remap task_entries")

Cc: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent eebfeb92
...@@ -1102,7 +1102,7 @@ long __export_restore_task(struct task_restore_args *args) ...@@ -1102,7 +1102,7 @@ long __export_restore_task(struct task_restore_args *args)
act.rt_sa_restorer = cr_restore_rt; act.rt_sa_restorer = cr_restore_rt;
sys_sigaction(SIGCHLD, &act, NULL, sizeof(k_rtsigset_t)); sys_sigaction(SIGCHLD, &act, NULL, sizeof(k_rtsigset_t));
ksigfillset(&to_block); ksigemptyset(&to_block);
ksigaddset(&to_block, SIGCHLD); ksigaddset(&to_block, SIGCHLD);
ret = sys_sigprocmask(SIG_UNBLOCK, &to_block, NULL, sizeof(k_rtsigset_t)); ret = sys_sigprocmask(SIG_UNBLOCK, &to_block, NULL, sizeof(k_rtsigset_t));
......
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