Messages in this thread | | | From | schwidefsky@de ... | Date | Thu, 16 Nov 2000 17:12:27 +0100 | Subject | Re: 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/
| |