Problem getting all vmas

From: Breno (breno@secforum.com.br)
Date: Sun Sep 07 2003 - 09:55:01 EST


Hi , i tryed to get all vmas with this piece of code :

....
struct task_struct *task = find_task_by_pid();
struct vm_area_struct *vma,*next;

vma = task->mm->mmap;

while(vma)
{
     next = vma->vm_next;
    my_function();
    ....
    vma = next;
 }

but when i do insmod procm.o ... the program seems to enter in an infinite
loop.
Am I getting all vmas with this while() ?

thanks
Breno

-
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/



This archive was generated by hypermail 2b29 : Thu Aug 07 2003 - 22:00:38 EST