• Andrew Morton's avatar
    [PATCH] ppc64: hugepage bugfix · d0ebc08f
    Andrew Morton authored
    From: David Gibson <david@gibson.dropbear.id.au>
    
    Found this again while looking at hugepage extensions.  Haven't actually had
    it bite yet - the race is small and the other bug will never be triggered in
    32-bit processes, and the function is rarely called on 64-bit processes.
    
    This patch fixes two bugs in the (same part of the) PPC64 hugepage code.
    First the method we were using to free stale PTE pages was not safe with some
    recent changes (race condition).  BenH has fixed this to work in the new way.
     Second, we were not checking for a valid PGD entry before dereferencing the
    PMD page when scanning for stale PTE page pointers.
    d0ebc08f
hugetlbpage.c 22.5 KB