android_kernel_xiaomi_sm8350/fs/xfs/linux-2.6
Christoph Hellwig 6ab455eeaf [XFS] 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.

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>
2008-05-23 18:12:49 +10:00
..
kmem.c [XFS] replace remaining __FUNCTION__ occurrences 2008-04-18 11:51:26 +10:00
kmem.h
mrlock.h [XFS] shrink mrlock_t 2008-04-29 15:54:02 +10:00
mutex.h
sema.h Convert asm/semaphore.h users to linux/semaphore.h 2008-04-18 22:22:54 -04:00
sv.h
time.h
xfs_aops.c [XFS] Catch unwritten extent conversion errors. 2008-04-18 12:00:58 +10:00
xfs_aops.h
xfs_buf.c [XFS] Fix memory corruption with small buffer reads 2008-05-23 18:12:49 +10:00
xfs_buf.h [XFS] Fix memory corruption with small buffer reads 2008-05-23 18:12:49 +10:00
xfs_cred.h
xfs_dmapi_priv.h
xfs_export.c [XFS] kill di_mode checks after xfs_iget 2008-04-29 15:53:31 +10:00
xfs_export.h
xfs_file.c [XFS] Fix fsync() b0rkage. 2008-05-23 15:25:25 +10:00
xfs_fs_subr.c
xfs_fs_subr.h
xfs_globals.c
xfs_globals.h
xfs_ioctl32.c
xfs_ioctl32.h
xfs_ioctl.c [XFS] Cleanup xfs_attr a bit with xfs_name and remove cred 2008-04-29 15:54:55 +10:00
xfs_iops.c [XFS] remove manual lookup from xfs_rename and simplify locking 2008-04-29 15:54:12 +10:00
xfs_iops.h
xfs_linux.h [XFS] Include linux/random.h in all builds, not just debug builds. 2008-04-30 18:17:44 +10:00
xfs_lrw.c [XFS] shrink mrlock_t 2008-04-29 15:54:02 +10:00
xfs_lrw.h [XFS] remove sendfile leftovers 2008-04-29 16:08:14 +10:00
xfs_stats.c
xfs_stats.h
xfs_super.c [XFS] Add xfs_icsb_sync_counters_locked for when m_sb_lock already held 2008-04-29 15:57:11 +10:00
xfs_super.h [XFS] Remove CONFIG_XFS_SECURITY. 2008-04-18 12:04:19 +10:00
xfs_sysctl.c
xfs_sysctl.h
xfs_version.h
xfs_vfs.h [XFS] Remove periodic logging of in-core superblock counters. 2008-04-18 12:03:12 +10:00
xfs_vnode.c
xfs_vnode.h [XFS] Fix fsync() b0rkage. 2008-05-23 15:25:25 +10:00