Commit 1b5c4032 authored by Pavel Emelyanov's avatar Pavel Emelyanov

dump: Sanitize pstree dumping

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 3e8e358d
...@@ -1159,21 +1159,13 @@ static int dump_pstree(pid_t pid, const struct list_head *pstree_list) ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment