ah, I didn't thought at mprotect.
> MUST NOT markt it writable even if it is our last exclusive copy.
> 
> Which we've gotten wrong for a long time, actually. But you #if 0'ed the
> fix that happened fairly recently.
hmm, the stuff inside #if 0 doesn't seem to be correct either there,
write_access doesn't mean we have the right to write to it, it just mean
we're trying to.
anyways here it is the fix:
--- 2.4.10pre12aa1/mm/memory.c.~1~	Thu Sep 20 07:20:03 2001
+++ 2.4.10pre12aa1/mm/memory.c	Thu Sep 20 08:06:29 2001
@@ -1155,15 +1155,8 @@
 	pte = mk_pte(page, vma->vm_page_prot);
 
 	swap_free(entry);
-	if (exclusive_swap_page(page)) {	
-#if 0
-		if (write_access)
-			pte = pte_mkwrite(pte_mkdirty(pte));
-#else
+	if (exclusive_swap_page(page))
 		delete_from_swap_cache_nolock(page);
-		pte = pte_mkwrite(pte_mkdirty(pte));
-#endif
-	}
 	UnlockPage(page);
 
 	flush_page_to_ram(page);
thanks,
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/