x86: fix endless page faults in mount_block_root for Linux 2.6
[safe/jmp/linux-2.6] / arch / x86 / mm / fault.c
index fd7e179..8bcb6f4 100644 (file)
@@ -497,6 +497,11 @@ static int vmalloc_fault(unsigned long address)
        unsigned long pgd_paddr;
        pmd_t *pmd_k;
        pte_t *pte_k;
+
+       /* Make sure we are in vmalloc area */
+       if (!(address >= VMALLOC_START && address < VMALLOC_END))
+               return -1;
+
        /*
         * Synchronize this task's top level page-table
         * with the 'reference' page table.