From: Jesper Juhl Date: Thu, 16 Aug 2007 06:25:42 +0000 (+1000) Subject: [XFS] Fix a potential NULL pointer deref in XFS on failed mount. X-Git-Tag: v2.6.24-rc1~492^2~44 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49ee6c911f0ae5b3a9a04e0589e3265e52f94f53;p=pandora-kernel.git [XFS] Fix a potential NULL pointer deref in XFS on failed mount. If we fail to open the the log device buftarg, we can fall through to error handling code that fails to check for a NULL log device buftarg before calling xfs_free_buftarg(). This patch fixes the issue by checking mp->m_logdev_targp against NULL in xfs_unmountfs_close() and doing the proper xfs_blkdev_put(logdev); and xfs_blkdev_put(rtdev); on (!mp->m_rtdev_targp) in xfs_mount(). Discovered by the Coverity checker. SGI-PV: 968563 SGI-Modid: xfs-linux-melb:xfs-kern:29328a Signed-off-by: Jesper Juhl Signed-off-by: David Chinner Signed-off-by: Tim Shimmin --- Reading git-diff-tree failed