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

Re: Upgrading problem with my /proc/pid/smaps



Mauricio Lin <mauriciolin2000@xxxxxxxxxxxx> writes:

> The function that is invoking the segmentation fault
> is
> pte_offset_map(my_pmd, page). It is strange because
> this works for kernel 2.6.1 but it does not work for
> 2.6.9.
>
> Could anyone help me?
>
> Mauricio Lin.
...
>> 	for (page = start_address; page < end_address; page
>> += PAGE_SIZE) {
>> 		my_pgd = pgd_offset(mm, page);
>> 		if (pgd_none(*my_pgd) || pgd_bad(*my_pgd))
>> continue;
>> 		my_pmd = pmd_offset(my_pgd, page);
>> 		if (pmd_none(*my_pmd) || pmd_bad(*my_pmd))
>> continue;
>> 		my_pte = pte_offset_map(my_pmd, page);
>> 		if (pte_present(*my_pte)) {
>> 			*size += PAGE_SIZE;
>> 		}
>> 	  }
>> }
>> 
>> Does anyone know what is going on?

A wild guess: you're not unmapping the ptes, and in the new kernel
some of the ptes are in high memory and you're running out of room to
map them.

That's probably not it, but it's at least something to consider.

-- 
  Ed L Cashin <ecashin@xxxxxxxxxx>


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/