mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 21:38:16 +00:00
restore: fix restoring signal blocking mask on arm
RT_SIGFRAME_UC(sigframe).uc_sigmask.sig = args->blk_sigset; blk_sigset is u64, but uc_sigmask.sig has type ulong [2], so only a part of mask is restore here. This patch reworks restoring of blocking masks symmetrically to dumping these masks. Signed-off-by: Andrey Vagin <avagin@openvz.org> Tested-by: Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
a724acf571
commit
ae729638ef
@ -2025,7 +2025,8 @@ static int sigreturn_restore(pid_t pid, CoreEntry *core)
|
|||||||
thread_args[i].futex_rla = tcore->thread_core->futex_rla;
|
thread_args[i].futex_rla = tcore->thread_core->futex_rla;
|
||||||
thread_args[i].futex_rla_len = tcore->thread_core->futex_rla_len;
|
thread_args[i].futex_rla_len = tcore->thread_core->futex_rla_len;
|
||||||
thread_args[i].has_blk_sigset = tcore->thread_core->has_blk_sigset;
|
thread_args[i].has_blk_sigset = tcore->thread_core->has_blk_sigset;
|
||||||
thread_args[i].blk_sigset = tcore->thread_core->blk_sigset;
|
memcpy(&thread_args[i].blk_sigset,
|
||||||
|
&tcore->thread_core->blk_sigset, sizeof(k_rtsigset_t));
|
||||||
|
|
||||||
ret = prep_sched_info(&thread_args[i].sp, tcore->thread_core);
|
ret = prep_sched_info(&thread_args[i].sp, tcore->thread_core);
|
||||||
if (ret)
|
if (ret)
|
||||||
@ -2045,7 +2046,7 @@ static int sigreturn_restore(pid_t pid, CoreEntry *core)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task_args->t->blk_sigset = core->tc->blk_sigset;
|
memcpy(&task_args->t->blk_sigset, &core->tc->blk_sigset, sizeof(k_rtsigset_t));
|
||||||
task_args->t->has_blk_sigset = true;
|
task_args->t->has_blk_sigset = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -259,7 +259,7 @@ static int restore_thread_common(struct rt_sigframe *sigframe,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (args->has_blk_sigset)
|
if (args->has_blk_sigset)
|
||||||
RT_SIGFRAME_UC(sigframe).uc_sigmask.sig[0] = args->blk_sigset;
|
RT_SIGFRAME_UC(sigframe).uc_sigmask = args->blk_sigset;
|
||||||
|
|
||||||
restore_sched_info(&args->sp);
|
restore_sched_info(&args->sp);
|
||||||
if (restore_fpu(sigframe, args))
|
if (restore_fpu(sigframe, args))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user