patch-2.3.16 linux/fs/proc/mem.c
Next file: linux/fs/proc/openpromfs.c
Previous file: linux/fs/proc/base.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Thu Aug 26 12:34:55 1999
- Orig file:
v2.3.15/linux/fs/proc/mem.c
- Orig date:
Sat Jul 3 12:04:12 1999
diff -u --recursive --new-file v2.3.15/linux/fs/proc/mem.c linux/fs/proc/mem.c
@@ -10,6 +10,7 @@
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/proc_fs.h>
+#include <linux/bigmem.h>
#include <asm/page.h>
#include <asm/uaccess.h>
@@ -120,7 +121,9 @@
i = PAGE_SIZE-(addr & ~PAGE_MASK);
if (i > scount)
i = scount;
+ page = (char *) kmap((unsigned long) page, KM_READ);
copy_to_user(tmp, page, i);
+ kunmap((unsigned long) page, KM_READ);
addr += i;
tmp += i;
scount -= i;
@@ -177,7 +180,9 @@
i = PAGE_SIZE-(addr & ~PAGE_MASK);
if (i > count)
i = count;
+ page = (unsigned long) kmap((unsigned long) page, KM_WRITE);
copy_from_user(page, tmp, i);
+ kunmap((unsigned long) page, KM_WRITE);
addr += i;
tmp += i;
count -= i;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)