[CRIU] [PATCH] parasite: Relax the parasite_execute_trap_by_pid API

Pavel Emelyanov xemul at virtuozzo.com
Mon Oct 17 05:05:37 PDT 2016


Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>

---
 criu/parasite-syscall.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/criu/parasite-syscall.c b/criu/parasite-syscall.c
index cf7c5bc..2fbbab6 100644
--- a/criu/parasite-syscall.c
+++ b/criu/parasite-syscall.c
@@ -248,11 +248,11 @@ void *parasite_args_s(struct parasite_ctl *ctl, int args_size)
 	return ctl->addr_args;
 }
 
-static int parasite_execute_trap_by_pid(unsigned int cmd,
-					struct parasite_ctl *ctl, pid_t pid,
-					void *stack,
+static int parasite_run_in_thread(pid_t pid, unsigned int cmd,
+					struct parasite_ctl *ctl,
 					struct thread_ctx *octx)
 {
+	void *stack = ctl->r_thread_stack;
 	user_regs_struct_t regs = octx->regs;
 	int ret;
 
@@ -654,8 +654,7 @@ int parasite_dump_thread_seized(struct parasite_ctl *ctl, int id,
 	tc->has_blk_sigset = true;
 	memcpy(&tc->blk_sigset, &octx.sigmask, sizeof(k_rtsigset_t));
 
-	ret = parasite_execute_trap_by_pid(PARASITE_CMD_DUMP_THREAD, ctl,
-			pid, ctl->r_thread_stack, &octx);
+	ret = parasite_run_in_thread(pid, PARASITE_CMD_DUMP_THREAD, ctl, &octx);
 	if (ret) {
 		pr_err("Can't init thread in parasite %d\n", pid);
 		return -1;
-- 
2.5.0


More information about the CRIU mailing list