Bug: kmem file position after read_kmem

Amit S. Kale (akale@veritas.com)
Tue, 14 Dec 1999 15:30:20 +0530


Hi,

Due to a bug in read_kmem, kmem file position is not updated correctly after
read_kmem is called. Following patch fixes that.

--- linux-2.3.31/drivers/char/mem.c Sun Nov 28 04:57:48 1999
+++ mem.c Tue Dec 14 15:24:04 1999
@@ -249,7 +249,7 @@
virtr = vread(buf, (char *)p, count);
if (virtr < 0)
return virtr;
- *ppos += p + virtr;
+ *ppos = p + virtr;
return virtr + read;
}

--
Amit Kale

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/