lkml.org 
[lkml]   [2012]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] Mark thread stack correctly in proc/<pid>/maps
Hi

This version makes sense to me. and I verified this change don't break
procps tools.

But,

> +int vm_is_stack(struct task_struct *task,
> +                             struct vm_area_struct *vma, int in_group)
> +{
> +       if (vm_is_stack_for_task(task, vma))
> +               return 1;
> +
> +       if (in_group) {
> +               struct task_struct *t = task;
> +               while_each_thread(task, t) {

How protect this loop from task exiting? AFAIK, while_each_thread
require rcu_read_lock or task_list_lock.


> +                       if (vm_is_stack_for_task(t, vma))
> +                               return 1;
> +               }
> +       }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-02-24 00:21    [W:0.093 / U:5.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site