[XFS] Fix memory corruption with small buffer reads
authorChristoph Hellwig <hch@infradead.org>
Mon, 19 May 2008 06:34:42 +0000 (16:34 +1000)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Fri, 23 May 2008 08:12:49 +0000 (18:12 +1000)
When we have multiple buffers in a single page for a blocksize == pagesize
filesystem we might overwrite the page contents if two callers hit it
shortly after each other. To prevent that we need to keep the page locked
until I/O is completed and the page marked uptodate.

Thanks to Eric Sandeen for triaging this bug and finding a reproducible
testcase and Dave Chinner for additional advice.

This should fix kernel.org bz #10421.

Tested-by: Eric Sandeen <sandeen@sandeen.net>
SGI-PV: 981813
SGI-Modid: xfs-linux-melb:xfs-kern:31173a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>

No differences found