Re: Segmentation fault for kernel 2.6.9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Mauricio Lin <mauriciolin2000@xxxxxxxxxxxx> wrote:
Here goes the function that is throwing the segmentation fault:
 

void resident_mem_size(struct mm_struct *mm, unsigned long start_address,

unsigned long end_address, unsigned long *size) {

   pgd_t *my_pgd;

   pmd_t *my_pmd;

   pte_t *my_pte, pte;

   unsigned long page;

   for (page = start_address; page < end_address; page +=   PAGE_SIZE) {

      my_pgd = pgd_offset(mm, page);

      if (pgd_none(*my_pgd) || unlikely(pgd_bad(*my_pgd)))

         continue;

      my_pmd = pmd_offset(my_pgd, page);

      if (pmd_none(*my_pmd) || unlikely(pmd_bad(*my_pmd)))

         continue;

      my_pte = pte_offset_map(my_pmd, page);

      if (!my_pte)

         continue;

      pte = *my_pte;

      pte_unmap(my_pte);

      if (pte_present(pte)) {

         *size += PAGE_SIZE;

      }

   }

}



Jon Masters <jonmasters@xxxxxxxxx> wrote:
On Tue, 2 Nov 2004 23:42:53 -0300 (ART), Mauricio Lin
wrote:

> I have implemented a function called resident_mem_size for kernel 2.6.1.

We need to see at least the relevent line numbers of the source - can
you forward the function in question please?

> Nov 2 14:44:12 localhost kernel: EIP: 0060:[resident_mem_size+32/112] Not
> tainted VLI

The above line shows the line of your source which generated this NULL
pointer deference.

> Nov 2 14:44:12 localhost kernel: Call Trace:
>
> Nov 2 14:44:12 localhost kernel: [show_smap+75/592] show_smap+0x3b/0x130
>
> Nov 2 14:44:12 localhost kernel: [mmput+31/176] mmput+0x1f/0xb0
>
> Nov 2 14:44:12 localhost kernel: [seq_read+443/688] seq_read+0x1bb/0x2b0

That looks very odd. I don't see what mmput is doing there quite.
Please send your source.

Jon.


************************************************
Conhecimento vem do seu instrutor;
Sabedoria vem do seu interior.
(Bruce Lee)
************************************************

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



************************************************
Conhecimento vem do seu instrutor;
Sabedoria vem do seu interior.
(Bruce Lee)
************************************************

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux