[POWERPC] PowerPC: Prevent data exception in kernel space (32-bit)
[sfrench/cifs-2.6.git] / arch / powerpc / mm / fault.c
index bfe901353142f9d835eafa01cbf37b58868d0e10..115b25f50bf83786965380f041d301bad44218e0 100644 (file)
@@ -279,14 +279,13 @@ good_area:
 #endif /* CONFIG_8xx */
 
        if (is_exec) {
 #endif /* CONFIG_8xx */
 
        if (is_exec) {
-#ifdef CONFIG_PPC64
+#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
                /* protection fault */
                if (error_code & DSISR_PROTFAULT)
                        goto bad_area;
                if (!(vma->vm_flags & VM_EXEC))
                        goto bad_area;
                /* protection fault */
                if (error_code & DSISR_PROTFAULT)
                        goto bad_area;
                if (!(vma->vm_flags & VM_EXEC))
                        goto bad_area;
-#endif
-#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
+#else
                pte_t *ptep;
                pmd_t *pmdp;
 
                pte_t *ptep;
                pmd_t *pmdp;