]> err.no Git - linux-2.6/blobdiff - mm/memory.c
[MIPS] Disable UserLocal runtime detection on platforms which never have it.
[linux-2.6] / mm / memory.c
index 61d51da7e17c7e165ea69ac2383f54e2256567c9..8aace3db3a54b9d9ca38291095fee3b0af9d2d15 100644 (file)
@@ -1765,6 +1765,15 @@ gotten:
 unlock:
        pte_unmap_unlock(page_table, ptl);
        if (dirty_page) {
+               /*
+                * Yes, Virginia, this is actually required to prevent a race
+                * with clear_page_dirty_for_io() from clearing the page dirty
+                * bit after it clear all dirty ptes, but before a racing
+                * do_wp_page installs a dirty pte.
+                *
+                * do_no_page is protected similarly.
+                */
+               wait_on_page_locked(dirty_page);
                set_page_dirty_balance(dirty_page);
                put_page(dirty_page);
        }
@@ -2856,3 +2865,4 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in
 
        return buf - old_buf;
 }
+EXPORT_SYMBOL_GPL(access_process_vm);