[CRIU] [PATCH 3/2] signal/arm32: copy the whole rt_sa_mask

Dmitry Safonov dsafonov at virtuozzo.com
Fri Jun 24 03:23:27 PDT 2016


I wounder, was it ever working on ARM32?
Maybe I don't get this code right?

Cc: Christopher Covington <cov at codeaurora.org>
Cc: Cyrill Gorcunov <gorcunov at openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 criu/cr-restore.c       | 2 +-
 criu/parasite-syscall.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index e53c8848281c..686debecd686 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -319,7 +319,7 @@ static int restore_one_sigaction(int sig, struct cr_img *img, int pid)
 	ASSIGN_TYPED(act.rt_sa_handler, decode_pointer(e->sigaction));
 	ASSIGN_TYPED(act.rt_sa_flags, e->flags);
 	ASSIGN_TYPED(act.rt_sa_restorer, decode_pointer(e->restorer));
-	ASSIGN_TYPED(act.rt_sa_mask.sig[0], e->mask);
+	memcpy(act.rt_sa_mask.sig, &e->mask, sizeof(act.rt_sa_mask.sig));
 
 	sa_entry__free_unpacked(e, NULL);
 
diff --git a/criu/parasite-syscall.c b/criu/parasite-syscall.c
index e8e31fb2da4a..1c3e44ded738 100644
--- a/criu/parasite-syscall.c
+++ b/criu/parasite-syscall.c
@@ -675,7 +675,7 @@ int parasite_dump_sigacts_seized(struct parasite_ctl *ctl, struct cr_imgset *cr_
 		ASSIGN_TYPED(se.sigaction, encode_pointer(args->sas[i].rt_sa_handler));
 		ASSIGN_TYPED(se.flags, args->sas[i].rt_sa_flags);
 		ASSIGN_TYPED(se.restorer, encode_pointer(args->sas[i].rt_sa_restorer));
-		ASSIGN_TYPED(se.mask, args->sas[i].rt_sa_mask.sig[0]);
+		memcpy(&se.mask, args->sas[i].rt_sa_mask.sig, sizeof(se.mask));
 
 		if (pb_write_one(img, &se, PB_SIGACT) < 0)
 			return -1;
-- 
2.9.0



More information about the CRIU mailing list