2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-03 07:45:17 +00:00

dump: Sanitize pstree dumping

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2012-03-22 20:51:47 +04:00
parent 3e8e358d82
commit 1b5c403241

View File

@@ -1159,21 +1159,13 @@ static int dump_pstree(pid_t pid, const struct list_head *pstree_list)
if (write_img(pstree_fd, &e)) if (write_img(pstree_fd, &e))
goto err; goto err;
pr_info("Children:"); if (write_img_buf(pstree_fd, item->children,
for (i = 0; i < item->nr_children; i++) { item->nr_children * sizeof(u32)))
pr_info(" %d", item->children[i]); goto err;
if (write_img(pstree_fd, &item->children[i]))
goto err;
}
pr_info("\n");
pr_info("Threads:\n"); if (write_img_buf(pstree_fd, item->threads,
for (i = 0; i < item->nr_threads; i++) { item->nr_threads * sizeof(u32)))
pr_info(" %d", item->threads[i]); goto err;
if (write_img(pstree_fd, &item->threads[i]))
goto err;
}
pr_info("\n");
} }
ret = 0; ret = 0;