get_pte_kernel_slow() looks a bit (ok, a lot) like this:

pte_t *get_pte_kernel_slow(pmd_t *pmd, unsigned long offset)
{
        pte_t *pte;

        pte = (pte_t *) get_small_page(GFP_KERNEL);
        if (pmd_none(*pmd)) {
                if (pte) {
                        memzero(pte, PTRS_PER_PTE * BYTES_PER_PTR);
                        set_pmd(pmd, mk_kernel_pmd(pte));
                        return pte + offset;
                }
                set_pmd(pmd, mk_kernel_pmd(BAD_PAGETABLE));
                return NULL;
        }
        free_small_page((unsigned long) pte);
        if (pmd_bad(*pmd)) {
                __bad_pmd_kernel(pmd);
                return NULL;
        }
        return (pte_t *) pmd_page(*pmd) + offset;
}

Can it happen that get_small_page() returns NULL owing to a memory shortage, 
but we sleep anyway and somebody else fills in the pte in the meantime, in 
which case we end up passing NULL back to free_small_page?  (I've been getting 
complaints from that routine in my syslog from time to time.)

p.


unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]

Reply via email to