/dev/kmem PATCH for kernel 2.1.15

Marcin Dalecki (dalecki@sub994.sub.uni-goettingen.de)
Fri, 13 Dec 1996 16:18:34 +0100 (MET)


HELLO:!

The following patch will make the /dev/kmem and /dev/mem work again!
If unsure:

Just try out the ksyms app from the modules-2.1.13 suite before and
after. Or look at the last line of the same procedure to which the
patch applies. There is exactly the complementary __va(p).

It applies to the whole series of 2.1.x kernels.

Please include it into the next official patch-release.

Many thank's in advance:

Marcin

PS.:
kurwa ma"c, took it long to find this one liner!

diff -ur linux-old/drivers/char/mem.c linux/drivers/char/mem.c
--- linux-old/drivers/char/mem.c Mon Oct 28 13:29:20 1996
+++ linux/drivers/char/mem.c Thu Dec 12 22:57:57 1996
@@ -49,7 +52,7 @@
static long read_mem(struct inode * inode, struct file * file,
char * buf, unsigned long count)
{
- unsigned long p = file->f_pos;
+ unsigned long p = __pa(file->f_pos);
unsigned long end_mem;
int read;