[CRIU] [PATCH] restore: attach to threads of the root task in case of rst_sibling
Andrey Vagin
avagin at openvz.org
Thu Apr 23 04:23:02 PDT 2015
In case of rst_sibling, we are tracing the root task, but we are tracing
only the leader thread, so we must attach to other threads to stop them.
Reported-by: Ross Boucher <rboucher at gmail.com>
Cc: Ross Boucher <rboucher at gmail.com>
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
cr-restore.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/cr-restore.c b/cr-restore.c
index 51003e8..f363677 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -1594,7 +1594,7 @@ static int attach_to_tasks(bool root_seized, enum trace_flags *flag)
for (i = 0; i < item->nr_threads; i++) {
pid = item->threads[i].real;
- if (item != root_item || !root_seized) {
+ if (item != root_item || !root_seized || i != 0) {
if (ptrace(PTRACE_ATTACH, pid, 0, 0)) {
pr_perror("Can't attach to %d", pid);
return -1;
--
2.1.0
More information about the CRIU
mailing list