patch-1.3.18 linux/arch/i386/kernel/ptrace.c

Next file: linux/arch/i386/kernel/setup.c
Previous file: linux/arch/alpha/kernel/ptrace.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.17/linux/arch/i386/kernel/ptrace.c linux/arch/i386/kernel/ptrace.c
@@ -173,10 +173,8 @@
 		goto repeat;
 	}
 /* this is a hack for non-kernel-mapped video buffers and similar */
-	if (page < high_memory) {
-		page += addr & ~PAGE_MASK;
-		*(unsigned long *) page = data;
-	}
+	if (page < high_memory)
+		*(unsigned long *) (page + (addr & ~PAGE_MASK)) = data;
 /* we're bypassing pagetables, so we have to set the dirty bit ourselves */
 /* this should also re-instate whatever read-only mode there was before */
 	*pgtable = pte_mkdirty(mk_pte(page, vma->vm_page_prot));

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected] with Sam's (original) version
of this