lkml.org 
[lkml]   [2015]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 20/24] task_diag: Only add VMAs for thread_group leader
On 07/06, Andrey Vagin wrote:
>
> From: David Ahern <dsahern@gmail.com>
>
> threads of a process share the same VMAs, so when dumping all threads
> for all processes only push vma data for group leader.

...

> @@ -492,6 +493,13 @@ static int task_diag_fill(struct task_struct *tsk, struct sk_buff *skb,
> }
>
> if (show_flags & TASK_DIAG_SHOW_VMA) {
> + /* if the request is to dump all threads of all processes
> + * only show VMAs for group leader.
> + */
> + if (req->dump_strategy == TASK_DIAG_DUMP_ALL_THREAD &&
> + !thread_group_leader(tsk))
> + goto done;
> +

This doesn't look right, group leader can be a zombie with ->mm == NULL,

> if (i >= n)
> err = fill_vma(tsk, skb, cb, &progress, show_flags);

so this probably needs something like find_lock_task_mm().

Oleg.



\
 
 \ /
  Last update: 2015-07-14 20:21    [W:0.290 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site