[PATCH] BAD data corruption in -pre5 - it's really urgent.

Alexander Viro (viro@math.psu.edu)
Fri, 3 Dec 1999 01:20:44 -0500 (EST)


Linus, there is a problem with -pre{4,5} - it's partially my
fault, since I just left the thing in FYI status (I intended to submit the
patch when I will be sure that it works). Please, apply the following to
fs/buffer.c:

@@ -1449,6 +1449,8 @@
err = copy_from_user(kaddr+from, buf, to-from);
if (to < zeroto)
memset(kaddr+to, 0, zeroto-to);
+ else
+ zeroto = to;
if (err < 0)
goto out;
/*
Explanation: zeroto is left 0 if there is no new buffers partially written
within a page. In that case it fails to dirty any buffer - with obvious
results. Fixed variant (that's what was posted for testing on l-k) didn't
bring any bug reports so far. Ouch...
Al

-
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/