lkml.org 
[lkml]   [2009]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: All pages belonging to a process
On Tue, 25 Aug 2009, Anupama Chandwani wrote:

>       /* For all vma-s of a process */
>       for (vma = task->mm->mmap; vma!=NULL; vma = vma->next)

you mean vma->vm_next?

>       {
>                pgd = pgd_offset(mm, address);
>                if (!pgd_present(*pgd))
>                     continue;
>
>                pud = pud_offset(pgd, address);
>                if (!pud_present(*pud))
>                     continue;
>
>                pmd = pmd_offset(pud, address);
>                if (!pmd_present(*pmd))
>                     continue;
>
>               pte = pte_offset_map_lock (task->mm->vm_mm, pmd, address, &ptl);
>
>               print pte_pfn(*pte) and other debug info;
>
>               pte_unmap_unlock(pte, ptl);
>       }
> }
>
> The code hangs. I do not get anything in dmesg.

Do you have mmap_sem locked?

--
Jiri Kosina
SUSE Labs
\
 
 \ /
  Last update: 2009-08-25 14:47    [W:0.030 / U:5.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site