[Bugme-new] [Bug 12547] New: vmalloc_fault handling in x86_64

bugme-daemon at bugzilla.kernel.org bugme-daemon at bugzilla.kernel.org
Mon Jan 26 19:08:35 PST 2009


http://bugzilla.kernel.org/show_bug.cgi?id=12547

           Summary: vmalloc_fault handling in x86_64
           Product: Memory Management
           Version: 2.5
     KernelVersion: 2.6.18
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Other
        AssignedTo: akpm at osdl.org
        ReportedBy: ajith_kumarb at yahoo.co.in


I was going through the vmalloc fault handling for x86_64 and am unclear about
the following lines in the vmalloc_fault() function.

pgd = pgd_offset(current->mm ?: &init_mm, address);
pgd_ref = pgd_offset_k(address);

Here the intention is to get the pgd corresponding to the current process and
sync it up with the pgd in init_mm(obtained from pgd_offset_k). However, for
kernel threads current->mm is NULL and hence
pgd = pgd_offset(init_mm, address) = pgd_ref which means the fault handler
returns without setting the pgd entry in the MM structure in the context of
which the kernel thread has faulted. This could lead to never-ending faults and
busy looping of kernel threads like pdflush.
So, shouldn't the
pgd = pgd_offset(current->mm ?: &init_mm, address);
be
pgd = pgd_offset(current->active_mm ?: &init_mm, address);


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


More information about the Bugme-new mailing list