From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750834AbZHYMo3 (ORCPT ); Tue, 25 Aug 2009 08:44:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750766AbZHYMo0 (ORCPT ); Tue, 25 Aug 2009 08:44:26 -0400 Received: from cantor.suse.de ([195.135.220.2]:44138 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750759AbZHYMoZ (ORCPT ); Tue, 25 Aug 2009 08:44:25 -0400 Date: Tue, 25 Aug 2009 14:44:22 +0200 (CEST) From: Jiri Kosina X-X-Sender: jikos@twin.jikos.cz To: Anupama Chandwani Cc: linux kernel mailing list Subject: Re: All pages belonging to a process In-Reply-To: <689eb3470908242336o6681b516uc21d07979099d8c8@mail.gmail.com> Message-ID: References: <689eb3470908242336o6681b516uc21d07979099d8c8@mail.gmail.com> User-Agent: Alpine 2.00 (LRH 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-1747641777-829977352-1251204267=:11692" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1747641777-829977352-1251204267=:11692 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT 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 ---1747641777-829977352-1251204267=:11692--