]> err.no Git - linux-2.6/blobdiff - arch/x86/mm/fault_32.c
x86: make sure initmem is writable
[linux-2.6] / arch / x86 / mm / fault_32.c
index 41c31968a74ce86a82c664c838234feed01fe6f6..f4f8c324715f5abdf835fdf80c444f024fdedaf8 100644 (file)
@@ -613,9 +613,10 @@ no_context:
 
 #ifdef CONFIG_X86_PAE
                if (error_code & PF_INSTR) {
-                       pte_t *pte = lookup_address(address);
+                       int level;
+                       pte_t *pte = lookup_address(address, &level);
 
-                       if (pte && pte_present(*pte) && !pte_exec_kernel(*pte))
+                       if (pte && pte_present(*pte) && !pte_exec(*pte))
                                printk(KERN_CRIT "kernel tried to execute "
                                        "NX-protected page - exploit attempt? "
                                        "(uid: %d)\n", current->uid);