]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/mm/mem.c
Merge branch 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus...
[linux-2.6-omap-h63xx.git] / arch / powerpc / mm / mem.c
index ff5debf5eeddcef097b30b06e5ae97c5b4d4d833..93a5c53e3423fe7c5663b411cfe53cd82da73ad9 100644 (file)
@@ -485,7 +485,12 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
                 */
                _tlbie(address, 0 /* 8xx doesn't care about PID */);
 #endif
-               if (!PageReserved(page)
+               /* The _PAGE_USER test should really be _PAGE_EXEC, but
+                * older glibc versions execute some code from no-exec
+                * pages, which for now we are supporting.  If exec-only
+                * pages are ever implemented, this will have to change.
+                */
+               if (!PageReserved(page) && (pte_val(pte) & _PAGE_USER)
                    && !test_bit(PG_arch_1, &page->flags)) {
                        if (vma->vm_mm == current->active_mm) {
                                __flush_dcache_icache((void *) address);