lkml.org 
[lkml]   [2000]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: Memory management bug


    >What happens if you just replace all places that would use a bad page
    >table with a BUG()? (Ie do _not_ add the bug to the place where you
    >added the test: by that time it's too late. I'm talking about the
    >places where the bad page tables are used, like in the error cases of
    >"get_pte_kernel_slow()" etc.

    Ok, the BUG() hit in get_pmd_slow:

    pmd_t *
    get_pmd_slow(pgd_t *pgd, unsigned long offset)
    {
    pmd_t *pmd;
    int i;

    pmd = (pmd_t *) __get_free_pages(GFP_KERNEL,2);
    if (pgd_none(*pgd)) {
    if (pmd) {
    for (i = 0; i < PTRS_PER_PMD; i++)
    pmd_clear(pmd+i);
    pgd_set(pgd, pmd);
    return pmd + offset;
    }
    BUG(); /* <--- this one hit */
    pmd = (pmd_t *) get_bad_pmd_table();
    pgd_set(pgd, pmd);
    return NULL;
    }
    free_pages((unsigned long)pmd,2);
    if (pgd_bad(*pgd))
    BUG();
    return (pmd_t *) pgd_page(*pgd) + offset;
    }

    The allocation of 4 consecutive pages for the page middle directory failed.
    This caused empty_bad_pmd_table to be used and clear_page_tables inserted
    it to the pmd quicklist. The important question is: why did
    __get_free_pages fail?

    blue skies,
    Martin

    Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH
    Schönaicherstr. 220, D-71032 Böblingen, Telefon: 49 - (0)7031 - 16-2247
    E-Mail: schwidefsky@de.ibm.com


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 12:47    [W:6.270 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site