]> err.no Git - linux-2.6/commit
[XFS] Really fix use after free in xfs_iunpin.
authorDavid Chinner <dgc@sgi.com>
Thu, 28 Sep 2006 01:06:03 +0000 (11:06 +1000)
committerTim Shimmin <tes@sgi.com>
Thu, 28 Sep 2006 01:06:03 +0000 (11:06 +1000)
commitf273ab848b7cbc0088b0ac7457b3769e6566074e
tree27f1b0ce7b056f77e7105284524cbdb658943ae5
parent01106eae97b70399ce5a273a3cceb5246e8d9cc8
[XFS] Really fix use after free in xfs_iunpin.

The previous attempts to fix the linux inode use-after-free in xfs_iunpin
simply made the problem harder to hit. We actually need complete exclusion
between xfs_reclaim and xfs_iunpin, as well as ensuring that the i_flags
are consistent during both of these functions. Introduce a new spinlock
for exclusion and the i_flags, and fix up xfs_iunpin to use igrab before
marking the inode dirty.

SGI-PV: 952967
SGI-Modid: xfs-linux-melb:xfs-kern:26964a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
fs/xfs/linux-2.6/xfs_super.c
fs/xfs/xfs_iget.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.h
fs/xfs/xfs_itable.c
fs/xfs/xfs_vnodeops.c