xfs
[Top] [All Lists]

TAKE 981813 - Fix memory corruption with small buffer reads

To: sgi.bugs.xfs@xxxxxxxxxxxx
Subject: TAKE 981813 - Fix memory corruption with small buffer reads
From: dgc@xxxxxxx (David Chinner)
Date: Fri, 16 May 2008 12:11:35 +1000 (EST)
Cc: xfs@xxxxxxxxxxx
Sender: xfs-bounce@xxxxxxxxxxx
Fix memory corruption with small buffer reads

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.


Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Tested-by: Eric Sandeen <sandeen@xxxxxxxxxxx>

Date:  Fri May 16 12:10:56 AEST 2008
Workarea:  chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs
Inspected by:  hch@xxxxxx

The following file(s) were checked into:
  longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb


Modid:  xfs-linux-melb:xfs-kern:31173a
fs/xfs/linux-2.6/xfs_buf.h - 1.125 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_buf.h.diff?r1=text&tr1=1.125&r2=text&tr2=1.124&f=h
        - Reintroduce page locking for sub-blocksize buffer read 
synchronisation.

fs/xfs/linux-2.6/xfs_buf.c - 1.256 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_buf.c.diff?r1=text&tr1=1.256&r2=text&tr2=1.255&f=h
        - Reintroduce page locking for sub-blocksize buffer read 
synchronisation.



<Prev in Thread] Current Thread [Next in Thread>
  • TAKE 981813 - Fix memory corruption with small buffer reads, David Chinner <=