patch-2.4.27 linux-2.4.27/drivers/char/mem.c

Next file: linux-2.4.27/drivers/char/nvram.c
Previous file: linux-2.4.27/drivers/char/istallion.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/drivers/char/mem.c linux-2.4.27/drivers/char/mem.c
@@ -64,7 +64,7 @@
 	if (copy_from_user(p, buf, count))
 		return -EFAULT;
 	written += count;
-	*ppos += written;
+	*ppos = realp + written;
 	return written;
 }
 
@@ -105,7 +105,7 @@
 	if (copy_to_user(buf, __va(p), count))
 		return -EFAULT;
 	read += count;
-	*ppos += read;
+	*ppos = p + read;
 	return read;
 }
 

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