linux/fs/xfs
Eric Sandeen 93e8befc17 xfs: handle error if xfs_btree_get_bufs fails
Jason reported that a corrupted filesystem failed to replay
the log with a metadata block out of bounds warning:

XFS (dm-2): _xfs_buf_find: Block out of range: block 0x80270fff8, EOFS 0x9c40000

_xfs_buf_find() and xfs_btree_get_bufs() return NULL if
that happens, and then when xfs_alloc_fix_freelist() calls
xfs_trans_binval() on that NULL bp, we oops with:

BUG: unable to handle kernel NULL pointer dereference at 00000000000000f8

We don't handle _xfs_buf_find errors very well, every
caller higher up the stack gets to guess at why it failed.
But we should at least handle it somehow, so return
EFSCORRUPTED here.

Reported-by: Jason L Tibbitts III <tibbs@math.uh.edu>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
2017-10-11 10:21:07 -07:00
..
libxfs xfs: handle error if xfs_btree_get_bufs fails 2017-10-11 10:21:07 -07:00
Kconfig
kmem.c
kmem.h
Makefile
mrlock.h
xfs.h
xfs_acl.c xfs: don't change inode mode if ACL update fails 2017-10-11 10:21:06 -07:00
xfs_acl.h
xfs_aops.c xfs: update i_size after unwritten conversion in dio completion 2017-09-26 10:55:19 -07:00
xfs_aops.h
xfs_attr.h
xfs_attr_inactive.c xfs: reinit btree pointer on attr tree inactivation walk 2017-10-11 10:21:07 -07:00
xfs_attr_list.c
xfs_bmap_item.c
xfs_bmap_item.h
xfs_bmap_util.c xfs: move more RT specific code under CONFIG_XFS_RT 2017-10-11 10:21:06 -07:00
xfs_bmap_util.h xfs: move more RT specific code under CONFIG_XFS_RT 2017-10-11 10:21:06 -07:00
xfs_buf.c xfs: remove redundant re-initialization of total_nr_pages 2017-09-25 18:22:30 -07:00
xfs_buf.h
xfs_buf_item.c
xfs_buf_item.h
xfs_dir2_readdir.c
xfs_discard.c
xfs_discard.h
xfs_dquot.c
xfs_dquot.h
xfs_dquot_item.c
xfs_dquot_item.h
xfs_error.c fs/xfs: Use %pS printk format for direct addresses 2017-09-25 18:22:30 -07:00
xfs_error.h
xfs_export.c
xfs_export.h
xfs_extent_busy.c
xfs_extent_busy.h
xfs_extfree_item.c
xfs_extfree_item.h
xfs_file.c xfs: Fix bool initialization/comparison 2017-10-11 10:21:06 -07:00
xfs_filestream.c
xfs_filestream.h
xfs_fsmap.c xfs: move more RT specific code under CONFIG_XFS_RT 2017-10-11 10:21:06 -07:00
xfs_fsmap.h
xfs_fsops.c
xfs_fsops.h
xfs_globals.c
xfs_icache.c
xfs_icache.h
xfs_icreate_item.c
xfs_icreate_item.h
xfs_inode.c xfs: don't unconditionally clear the reflink flag on zero-block files 2017-09-25 18:22:30 -07:00
xfs_inode.h
xfs_inode_item.c xfs: Don't log uninitialised fields in inode structures 2017-10-11 10:21:06 -07:00
xfs_inode_item.h
xfs_ioctl.c xfs: validate bdev support for DAX inode flag 2017-09-26 10:55:19 -07:00
xfs_ioctl.h
xfs_ioctl32.c
xfs_ioctl32.h
xfs_iomap.c xfs: update i_size after unwritten conversion in dio completion 2017-09-26 10:55:19 -07:00
xfs_iomap.h xfs: update i_size after unwritten conversion in dio completion 2017-09-26 10:55:19 -07:00
xfs_iops.c
xfs_iops.h
xfs_itable.c
xfs_itable.h
xfs_linux.h xfs: XFS_IS_REALTIME_INODE() should be false if no rt device present 2017-09-12 20:02:22 -07:00
xfs_log.c xfs: Fix bool initialization/comparison 2017-10-11 10:21:06 -07:00
xfs_log.h
xfs_log_cil.c
xfs_log_priv.h
xfs_log_recover.c
xfs_message.c
xfs_message.h
xfs_mount.c xfs: Fix bool initialization/comparison 2017-10-11 10:21:06 -07:00
xfs_mount.h
xfs_mru_cache.c
xfs_mru_cache.h
xfs_ondisk.h xfs: Don't log uninitialised fields in inode structures 2017-10-11 10:21:06 -07:00
xfs_pnfs.c xfs: update i_size after unwritten conversion in dio completion 2017-09-26 10:55:19 -07:00
xfs_pnfs.h
xfs_qm.c
xfs_qm.h
xfs_qm_bhv.c
xfs_qm_syscalls.c
xfs_quota.h
xfs_quotaops.c
xfs_refcount_item.c
xfs_refcount_item.h
xfs_reflink.c xfs: handle racy AIO in xfs_reflink_end_cow 2017-10-03 21:27:55 -07:00
xfs_reflink.h
xfs_rmap_item.c
xfs_rmap_item.h
xfs_rtalloc.c
xfs_rtalloc.h
xfs_stats.c
xfs_stats.h
xfs_super.c xfs: Output warning message when discard option was enabled even though the device does not support discard 2017-09-25 18:22:30 -07:00
xfs_super.h
xfs_symlink.c
xfs_symlink.h
xfs_sysctl.c
xfs_sysctl.h
xfs_sysfs.c
xfs_sysfs.h
xfs_trace.c
xfs_trace.h
xfs_trans.c
xfs_trans.h
xfs_trans_ail.c
xfs_trans_bmap.c
xfs_trans_buf.c
xfs_trans_dquot.c
xfs_trans_extfree.c
xfs_trans_inode.c
xfs_trans_priv.h
xfs_trans_refcount.c
xfs_trans_rmap.c
xfs_xattr.c