patch-2.3.11 linux/kernel/ptrace.c

Next file: linux/kernel/resource.c
Previous file: linux/kernel/panic.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.10/linux/kernel/ptrace.c linux/kernel/ptrace.c
@@ -39,6 +39,8 @@
 	if (!pte_present(*pgtable))
 		goto fault_in_page;
 	page = pte_page(*pgtable);
+	if (write && (!pte_write(*pgtable) || !pte_dirty(*pgtable)))
+		goto fault_in_page;
 	if (MAP_NR(page) >= max_mapnr)
 		return 0;
 	flush_cache_page(vma, addr);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)