[CRIU] [PATCH 1/2] restore: fix restoring signal blocking mask on arm
Andrew Vagin
avagin at parallels.com
Wed Apr 24 12:11:43 EDT 2013
Alexander, could you try out this patch. You can execute ./zdtm.sh
static/sigpending for that. Thanks.
On Wed, Apr 24, 2013 at 08:09:19PM +0400, Andrey Vagin wrote:
> 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 at openvz.org>
> ---
> cr-restore.c | 5 +++--
> pie/restorer.c | 2 +-
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/cr-restore.c b/cr-restore.c
> index f1cb706..a89fbd1 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -2013,7 +2013,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_len = tcore->thread_core->futex_rla_len;
> 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);
> if (ret)
> @@ -2033,7 +2034,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;
>
> /*
> diff --git a/pie/restorer.c b/pie/restorer.c
> index 2a30b29..8ed94cc 100644
> --- a/pie/restorer.c
> +++ b/pie/restorer.c
> @@ -219,7 +219,7 @@ static int restore_thread_common(struct rt_sigframe *sigframe,
> }
>
> if (args->has_blk_sigset)
> - RT_SIGFRAME_UC(sigframe).uc_sigmask.sig = args->blk_sigset;
> + RT_SIGFRAME_UC(sigframe).uc_sigmask = args->blk_sigset;
>
> restore_sched_info(&args->sp);
> if (restore_fpu(sigframe, args))
> --
> 1.8.2
>
More information about the CRIU
mailing list