[CRIU] [PATCH 19/21] parasite: transfer a pointer on sigframe to parasite

Andrey Vagin avagin at openvz.org
Fri May 24 08:20:22 EDT 2013


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 include/parasite.h | 2 ++
 parasite-syscall.c | 1 +
 pie/parasite.c     | 3 +++
 3 files changed, 6 insertions(+)

diff --git a/include/parasite.h b/include/parasite.h
index 5ea6847..83f1953 100644
--- a/include/parasite.h
+++ b/include/parasite.h
@@ -74,6 +74,8 @@ struct parasite_init_args {
 	int			nr_threads;
 
 	k_rtsigset_t		sig_blocked;
+
+	struct rt_sigframe	*sigframe;
 };
 
 struct parasite_log_args {
diff --git a/parasite-syscall.c b/parasite-syscall.c
index d62e9fd..250800d 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -387,6 +387,7 @@ static int parasite_init(struct parasite_ctl *ctl, pid_t pid, int nr_threads)
 	args->h_addr_len = gen_parasite_saddr(&args->h_addr, getpid());
 	args->p_addr_len = gen_parasite_saddr(&args->p_addr, pid);
 	args->nr_threads = nr_threads;
+	args->sigframe = ctl->threads[0].rsigframe;
 	args->id = 0;
 
 	if (sock == -1) {
diff --git a/pie/parasite.c b/pie/parasite.c
index 8cf0f09..051b7d7 100644
--- a/pie/parasite.c
+++ b/pie/parasite.c
@@ -25,6 +25,8 @@ static struct tid_state_s {
 
 	bool		use_sig_blocked;
 	k_rtsigset_t	sig_blocked;
+
+	struct rt_sigframe *sigframe;
 } *tid_state;
 
 static unsigned int nr_tid_state;
@@ -212,6 +214,7 @@ static int init_thread(struct parasite_init_args *args)
 	args->sig_blocked = tid_state[next_tid_state].sig_blocked;
 
 	tid_state[next_tid_state].id = next_tid_state;
+	tid_state[next_tid_state].sigframe = args->sigframe;
 
 	futex_set(&tid_state[next_tid_state].cmd, PARASITE_CMD_IDLE);
 
-- 
1.8.2



More information about the CRIU mailing list