[CRIU] [PATCH 1/2] restorer: unblock only SIGCHLD previously blocked in criu
Dmitry Safonov
dsafonov at virtuozzo.com
Tue Mar 7 11:37:16 PST 2017
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:3a61c38a5832 ("restore: block sigchld to remap task_entries")
Cc: Andrei Vagin <avagin at virtuozzo.com>
Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
criu/pie/restorer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/criu/pie/restorer.c b/criu/pie/restorer.c
index 1df5e2000ae0..9f8f969a03b5 100644
--- a/criu/pie/restorer.c
+++ b/criu/pie/restorer.c
@@ -1172,7 +1172,7 @@ long __export_restore_task(struct task_restore_args *args)
act.rt_sa_restorer = cr_restore_rt;
sys_sigaction(SIGCHLD, &act, NULL, sizeof(k_rtsigset_t));
- ksigfillset(&to_block);
+ ksigemptyset(&to_block);
ksigaddset(&to_block, SIGCHLD);
ret = sys_sigprocmask(SIG_UNBLOCK, &to_block, NULL, sizeof(k_rtsigset_t));
--
2.11.1
More information about the CRIU
mailing list