aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6
diff options
context:
space:
mode:
authorLachlan McIlroy <lachlan@sgi.com>2008-07-18 03:13:12 -0400
committerNiv Sardi <xaiki@debian.org>2008-07-28 02:59:34 -0400
commitc032bfcf468013643e05c8274824af10dd7cbb61 (patch)
treea45a27cb8647dd5685deccf2035acada24a93f4a /fs/xfs/linux-2.6
parent6a617dd22bdbf5a4c9828db98c1a8b076c9e95c8 (diff)
[XFS] fix use after free with external logs or real-time devices
SGI-PV: 983806 SGI-Modid: xfs-linux-melb:xfs-kern:31666a Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index b40086680047..30ae96397e31 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -792,12 +792,14 @@ xfs_close_devices(
792 struct xfs_mount *mp) 792 struct xfs_mount *mp)
793{ 793{
794 if (mp->m_logdev_targp && mp->m_logdev_targp != mp->m_ddev_targp) { 794 if (mp->m_logdev_targp && mp->m_logdev_targp != mp->m_ddev_targp) {
795 struct block_device *logdev = mp->m_logdev_targp->bt_bdev;
795 xfs_free_buftarg(mp->m_logdev_targp); 796 xfs_free_buftarg(mp->m_logdev_targp);
796 xfs_blkdev_put(mp->m_logdev_targp->bt_bdev); 797 xfs_blkdev_put(logdev);
797 } 798 }
798 if (mp->m_rtdev_targp) { 799 if (mp->m_rtdev_targp) {
800 struct block_device *rtdev = mp->m_rtdev_targp->bt_bdev;
799 xfs_free_buftarg(mp->m_rtdev_targp); 801 xfs_free_buftarg(mp->m_rtdev_targp);
800 xfs_blkdev_put(mp->m_rtdev_targp->bt_bdev); 802 xfs_blkdev_put(rtdev);
801 } 803 }
802 xfs_free_buftarg(mp->m_ddev_targp); 804 xfs_free_buftarg(mp->m_ddev_targp);
803} 805}