patch-2.4.19 linux-2.4.19/fs/proc/kcore.c

Next file: linux-2.4.19/fs/proc/proc_misc.c
Previous file: linux-2.4.19/fs/proc/generic.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/fs/proc/kcore.c linux-2.4.19/fs/proc/kcore.c
@@ -381,8 +381,13 @@
 			return tsz;
 	}
 #endif
-	/* fill the remainder of the buffer from kernel VM space */
-	start = (unsigned long)__va(*fpos - elf_buflen);
+	
+	/*
+	 * Fill the remainder of the buffer from kernel VM space.
+	 * We said in the ELF header that the data which starts
+	 * at 'elf_buflen' is virtual address PAGE_OFFSET. --rmk
+	 */
+	start = PAGE_OFFSET + (*fpos - elf_buflen);
 	if ((tsz = (PAGE_SIZE - (start & ~PAGE_MASK))) > buflen)
 		tsz = buflen;
 		

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