[CRIU] [PATCH 18/24] dump: fill sigblock mask immediately after getting it

Andrey Vagin avagin at openvz.org
Wed May 22 16:08:19 EDT 2013


It will be used for constructing sigframe for parasite threads

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 cr-dump.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/cr-dump.c b/cr-dump.c
index cf36e8b..99a88ff 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -630,7 +630,6 @@ static int dump_task_core_all(struct parasite_ctl *ctl,
 		struct vm_area_list *vma_area_list,
 		const struct cr_fdset *cr_fdset)
 {
-	k_rtsigset_t *sig_blocked = &ctl->threads[0].sig_blocked;
 	int fd_core = fdset_fd(cr_fdset, CR_FD_CORE);
 	int ret = -1;
 	pid_t pid = ctl->pid.real;
@@ -655,8 +654,6 @@ static int dump_task_core_all(struct parasite_ctl *ctl,
 
 	strncpy((char *)core->tc->comm, stat->comm, TASK_COMM_LEN);
 	core->tc->flags = stat->flags;
-	BUILD_BUG_ON(sizeof(core->tc->blk_sigset) != sizeof(k_rtsigset_t));
-	memcpy(&core->tc->blk_sigset, sig_blocked, sizeof(k_rtsigset_t));
 
 	core->tc->task_state = TASK_ALIVE;
 	core->tc->exit_code = 0;
@@ -1078,8 +1075,7 @@ static int collect_file_locks(void)
 }
 
 static int dump_task_thread(struct parasite_ctl *parasite_ctl,
-			    struct pid *tid, CoreEntry *core,
-			    k_rtsigset_t *sig_blocked)
+			    struct pid *tid, CoreEntry *core)
 {
 	int ret = -1, fd_core;
 	pid_t pid = tid->real;
@@ -1098,9 +1094,6 @@ static int dump_task_thread(struct parasite_ctl *parasite_ctl,
 		goto err;
 	}
 
-	core->thread_core->has_blk_sigset = true;
-	memcpy(&core->thread_core->blk_sigset, sig_blocked, sizeof(*sig_blocked));
-
 	ret = dump_sched_info(pid, core->thread_core);
 	if (ret)
 		goto err;
@@ -1213,8 +1206,7 @@ static int dump_task_threads(struct parasite_ctl *parasite_ctl,
 			item->threads[i].virt = item->pid.virt;
 			continue;
 		}
-		if (dump_task_thread(parasite_ctl, &item->threads[i], item->core[i],
-					&parasite_ctl->threads[i].sig_blocked))
+		if (dump_task_thread(parasite_ctl, &item->threads[i], item->core[i]))
 			return -1;
 	}
 
-- 
1.8.2



More information about the CRIU mailing list