From: Jiri Kosina <jkosina@suse.cz>
To: Anupama Chandwani <anupama.chandwani@gmail.com>
Cc: linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: All pages belonging to a process
Date: Tue, 25 Aug 2009 14:44:22 +0200 (CEST) [thread overview]
Message-ID: <alpine.LRH.2.00.0908251443230.11692@twin.jikos.cz> (raw)
In-Reply-To: <689eb3470908242336o6681b516uc21d07979099d8c8@mail.gmail.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 873 bytes --]
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
next prev parent reply other threads:[~2009-08-25 12:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-25 6:36 Anupama Chandwani
2009-08-25 12:44 ` Jiri Kosina [this message]
2009-08-26 20:28 ` Anupama Chandwani
2009-08-26 20:45 ` Anupama Chandwani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LRH.2.00.0908251443230.11692@twin.jikos.cz \
--to=jkosina@suse.cz \
--cc=anupama.chandwani@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®