Re: [PATCH] vfs_read/vfs_write small bug fix (2.5.29)

Paul Larson (plars@austin.ibm.com)
29 Jul 2002 16:06:52 -0500


On Mon, 2002-07-29 at 15:11, Linus Torvalds wrote:

> The fact is, the test for a negative "pos" should not be in
> vfs_read/write at all, since it can only happen for pread/pwrite.
That's where LTP has been seeing it fail.

> And pread/pwrite do not even _take_ a "loff_t" argument, they take a
> "off_t", and yet we've just happily claiming they do a loff_t, which
> means that they shouldn't work at all unless by pure changce user space
> happens to put a zero in memory in the right place.
>
> Cristoph, I think you're the one that did this re-org. I think the code
> is wrong, and the right fix is something along these lines (untested,
> you get brownie-points for testing against some standards test).
>
> Linus

This passes all the LTP pread and pwrite tests.

Thanks,
Paul Larson
Linux Test Project
http://ltp.sourceforge.net

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