Re: [PATCH] VFS readahead bug in 2.6.8-rc[1-3]

From: Phillip Lougher
Date: Fri Aug 06 2004 - 14:17:12 EST


Nick Piggin wrote:
Phillip Lougher wrote:

Nick Piggin wrote:

On second thought, maybe not. I think your filesystem is at fault.



No I'm not wrong here. With a read-only filesystem i_size can
never change, there are no possible race conditions. If a too
large index is passed it is a VFS bug. Are you suggesting I should
start to code assuming the VFS is broken?


No, I suggest you start to code assuming this interface does
what it does. I didn't say there is no bug here, but nobody
else's filesystem breaks.


Point one: The interface didn't do this UNTIL you changed the code
Point two: Just because no one has reported other filesystem
breakage, it doesn't mean other filesystems have not broken.

Perhaps I should have the check in my code. However, it is
still stupid to fix an occasional race by ensuring readpage() is
always called with an out of bounds index when files are 0 or a
4K multiple. The filesystem check may prevent a crash, but it
is needlessly wasteful by design, not through any inadvertant
race condition.

think is it stupid to fix an o. However, I it
stupid to fix a race co
ll think it stupid to fix a race you en

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