Skip to content

Commit

Permalink
[XFS] fix use after free with external logs or real-time devices
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lachlan McIlroy authored and Niv Sardi committed Jul 28, 2008
1 parent 6a617dd commit c032bfc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/xfs/linux-2.6/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,12 +792,14 @@ xfs_close_devices(
struct xfs_mount *mp)
{
if (mp->m_logdev_targp && mp->m_logdev_targp != mp->m_ddev_targp) {
struct block_device *logdev = mp->m_logdev_targp->bt_bdev;
xfs_free_buftarg(mp->m_logdev_targp);
xfs_blkdev_put(mp->m_logdev_targp->bt_bdev);
xfs_blkdev_put(logdev);
}
if (mp->m_rtdev_targp) {
struct block_device *rtdev = mp->m_rtdev_targp->bt_bdev;
xfs_free_buftarg(mp->m_rtdev_targp);
xfs_blkdev_put(mp->m_rtdev_targp->bt_bdev);
xfs_blkdev_put(rtdev);
}
xfs_free_buftarg(mp->m_ddev_targp);
}
Expand Down

0 comments on commit c032bfc

Please sign in to comment.