linux/fs/xfs
Jesper Juhl 49ee6c911f [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 <jesper.juhl@gmail.com>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
2007-10-15 16:42:48 +10:00
..
linux-2.6 [XFS] move linux/log2.h header to xfs_linux.h 2007-10-15 16:40:46 +10:00
quota [XFS] split ondisk vs incore versions of xfs_bmbt_rec_t 2007-10-15 16:25:51 +10:00
support [XFS] fix ASSERT and ASSERT_ALWAYS 2007-09-05 14:49:30 +10:00
Kbuild
Kconfig
Makefile
Makefile-linux-2.6 [XFS] Concurrent Multi-File Data Streams 2007-07-14 15:40:53 +10:00
xfs.h [XFS] Concurrent Multi-File Data Streams 2007-07-14 15:40:53 +10:00
xfs_acl.c
xfs_acl.h
xfs_ag.h [XFS] Concurrent Multi-File Data Streams 2007-07-14 15:40:53 +10:00
xfs_alloc.c [XFS] Clean up function name handling in tracing code 2007-07-14 15:41:24 +10:00
xfs_alloc.h [XFS] Lazy Superblock Counters 2007-07-14 15:28:50 +10:00
xfs_alloc_btree.c [XFS] Lazy Superblock Counters 2007-07-14 15:28:50 +10:00
xfs_alloc_btree.h
xfs_arch.h
xfs_attr.c
xfs_attr.h
xfs_attr_leaf.c
xfs_attr_leaf.h
xfs_attr_sf.h
xfs_behavior.c
xfs_behavior.h
xfs_bit.c [XFS] Kill off xfs_count_bits 2007-07-14 15:36:43 +10:00
xfs_bit.h [XFS] Kill off xfs_count_bits 2007-07-14 15:36:43 +10:00
xfs_bmap.c [XFS] endianess annotations for xfs_bmbt_rec_t 2007-10-15 16:26:44 +10:00
xfs_bmap.h [XFS] split ondisk vs incore versions of xfs_bmbt_rec_t 2007-10-15 16:25:51 +10:00
xfs_bmap_btree.c [XFS] endianess annotations for xfs_bmbt_rec_t 2007-10-15 16:26:44 +10:00
xfs_bmap_btree.h [XFS] endianess annotations for xfs_bmbt_rec_t 2007-10-15 16:26:44 +10:00
xfs_btree.c
xfs_btree.h [XFS] Simplify XFS min/max macros. 2007-07-14 15:36:53 +10:00
xfs_buf_item.c [XFS] Kill off xfs_count_bits 2007-07-14 15:36:43 +10:00
xfs_buf_item.h Revert "[XFS] Avoid replaying inode buffer initialisation log items if on-disk version is newer." 2007-10-01 16:39:37 +10:00
xfs_clnt.h [XFS] Concurrent Multi-File Data Streams 2007-07-14 15:40:53 +10:00
xfs_da_btree.c [XFS] fix sparse shadowed variable warnings 2007-09-05 14:50:26 +10:00
xfs_da_btree.h
xfs_dfrag.c [XFS] propogate return codes from flush routines 2007-05-08 13:49:27 +10:00
xfs_dfrag.h
xfs_dinode.h [XFS] Concurrent Multi-File Data Streams 2007-07-14 15:40:53 +10:00
xfs_dir2.c [XFS] Reduce shouting by removing unnecessary macros from dir2 code. 2007-07-14 15:37:02 +10:00
xfs_dir2.h
xfs_dir2_block.c [XFS] Reduce shouting by removing unnecessary macros from dir2 code. 2007-07-14 15:37:02 +10:00
xfs_dir2_block.h [XFS] Reduce shouting by removing unnecessary macros from dir2 code. 2007-07-14 15:37:02 +10:00
xfs_dir2_data.c [XFS] Reduce shouting by removing unnecessary macros from dir2 code. 2007-07-14 15:37:02 +10:00
xfs_dir2_data.h [XFS] Reduce shouting by removing unnecessary macros from dir2 code. 2007-07-14 15:37:02 +10:00
xfs_dir2_leaf.c [XFS] Reduce shouting by removing unnecessary macros from dir2 code. 2007-07-14 15:37:02 +10:00
xfs_dir2_leaf.h [XFS] Reduce shouting by removing unnecessary macros from dir2 code. 2007-07-14 15:37:02 +10:00
xfs_dir2_node.c [XFS] Reduce shouting by removing unnecessary macros from dir2 code. 2007-07-14 15:37:02 +10:00
xfs_dir2_node.h [XFS] Reduce shouting by removing unnecessary macros from dir2 code. 2007-07-14 15:37:02 +10:00
xfs_dir2_sf.c [XFS] Reduce shouting by removing unnecessary macros from dir2 code. 2007-07-14 15:37:02 +10:00
xfs_dir2_sf.h [XFS] Reduce shouting by removing unnecessary macros from dir2 code. 2007-07-14 15:37:02 +10:00
xfs_dir2_trace.c
xfs_dir2_trace.h
xfs_dmapi.h
xfs_dmops.c
xfs_error.c [XFS] reducing the number of random number functions. 2007-05-08 13:49:03 +10:00
xfs_error.h
xfs_extfree_item.c
xfs_extfree_item.h
xfs_filestream.c [XFS] fix filestreams on 32-bit boxes 2007-09-20 19:40:19 +10:00
xfs_filestream.h [XFS] Concurrent Multi-File Data Streams 2007-07-14 15:40:53 +10:00
xfs_fs.h [XFS] Concurrent Multi-File Data Streams 2007-07-14 15:40:53 +10:00
xfs_fsops.c [XFS] Concurrent Multi-File Data Streams 2007-07-14 15:40:53 +10:00
xfs_fsops.h
xfs_ialloc.c [XFS] Lazy Superblock Counters 2007-07-14 15:28:50 +10:00
xfs_ialloc.h [XFS] Pick a single default inode cluster size. 2007-10-15 16:39:35 +10:00
xfs_ialloc_btree.c
xfs_ialloc_btree.h
xfs_iget.c [XFS] Add lockdep support for XFS 2007-05-08 13:50:19 +10:00
xfs_imap.h
xfs_inode.c [XFS] move linux/log2.h header to xfs_linux.h 2007-10-15 16:40:46 +10:00
xfs_inode.h [XFS] split ondisk vs incore versions of xfs_bmbt_rec_t 2007-10-15 16:25:51 +10:00
xfs_inode_item.c
xfs_inode_item.h
xfs_inum.h
xfs_iocore.c [XFS] Fix to prevent the notorious 'NULL files' problem after a crash. 2007-05-08 13:49:46 +10:00
xfs_iomap.c [XFS] Cleanup inode extent size hint extraction 2007-07-14 15:35:36 +10:00
xfs_iomap.h [XFS] Fix to prevent the notorious 'NULL files' problem after a crash. 2007-05-08 13:49:46 +10:00
xfs_itable.c [XFS] Fix XFS_IOC_FSBULKSTAT{,_SINGLE} & XFS_IOC_FSINUMBERS in compat mode 2007-07-14 15:42:50 +10:00
xfs_itable.h [XFS] Fix XFS_IOC_FSBULKSTAT{,_SINGLE} & XFS_IOC_FSINUMBERS in compat mode 2007-07-14 15:42:50 +10:00
xfs_log.c [XFS] choose single default logbuf count & size 2007-10-15 16:38:23 +10:00
xfs_log.h
xfs_log_priv.h [XFS] clean up xfs_start_flags 2007-10-15 16:42:18 +10:00
xfs_log_recover.c Revert "[XFS] Avoid replaying inode buffer initialisation log items if on-disk version is newer." 2007-10-01 16:39:37 +10:00
xfs_log_recover.h
xfs_mount.c [XFS] Fix a potential NULL pointer deref in XFS on failed mount. 2007-10-15 16:42:48 +10:00
xfs_mount.h [XFS] Remove m_nreadaheads 2007-10-15 16:37:46 +10:00
xfs_mru_cache.c [XFS] On-demand reaping of the MRU cache 2007-09-17 16:42:02 +10:00
xfs_mru_cache.h [XFS] On-demand reaping of the MRU cache 2007-09-17 16:42:02 +10:00
xfs_qmops.c
xfs_quota.h [XFS] Fix uquota and oquota enforcement problems. 2007-05-08 13:49:33 +10:00
xfs_refcache.h
xfs_rename.c
xfs_rtalloc.c [XFS] Don't grow filesystems past the size they can index. 2007-07-14 15:21:29 +10:00
xfs_rtalloc.h
xfs_rw.c
xfs_rw.h [XFS] Remove m_nreadaheads 2007-10-15 16:37:46 +10:00
xfs_sb.h [XFS] Lazy Superblock Counters 2007-07-14 15:28:50 +10:00
xfs_trans.c [XFS] Apply transaction delta counts atomically to incore counters 2007-07-14 15:32:09 +10:00
xfs_trans.h [XFS] Lazy Superblock Counters 2007-07-14 15:28:50 +10:00
xfs_trans_ail.c
xfs_trans_buf.c Revert "[XFS] Avoid replaying inode buffer initialisation log items if on-disk version is newer." 2007-10-01 16:39:37 +10:00
xfs_trans_extfree.c
xfs_trans_inode.c
xfs_trans_item.c
xfs_trans_priv.h
xfs_trans_space.h
xfs_types.h
xfs_utils.c [XFS] propogate return codes from flush routines 2007-05-08 13:49:27 +10:00
xfs_utils.h
xfs_vfsops.c [XFS] Fix a potential NULL pointer deref in XFS on failed mount. 2007-10-15 16:42:48 +10:00
xfs_vnodeops.c [XFS] Ensure file size updates have been completed before writing inode to disk. 2007-09-18 20:12:51 +10:00