]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: fix a use after free in xfs_end_io_direct_write
authorChristoph Hellwig <hch@infradead.org>
Tue, 13 Sep 2011 22:26:00 +0000 (22:26 +0000)
committerAlex Elder <aelder@sgi.com>
Wed, 14 Sep 2011 13:56:35 +0000 (08:56 -0500)
commitf7c5f890b4abb3547faad06bb3b11b4fb3351988
tree1786857f965cb63887c2bd7fd8dd08aabaefab4a
parent47abdf718ed10a257b37edf2aaeb617cfd7705d0
xfs: fix a use after free in xfs_end_io_direct_write

There is a window in which the ioend that we call inode_dio_wake on
in xfs_end_io_direct_write is already free.  Fix this by storing
the inode pointer in a local variable.

This is a fix for the regression introduced in 3.1-rc by
"fs: move inode_dio_done to the end_io handler".

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/xfs_aops.c