alistair23-linux/fs/xfs
Darrick J. Wong f62cb48e43 xfs: don't allow insert-range to shift extents past the maximum offset
Zorro Lang reports that generic/485 blows an assert on a filesystem with
512 byte blocks.  The test tries to fallocate a post-eof extent at the
maximum file size and calls insert range to shift the extents right by
two blocks.  On a 512b block filesystem this causes startoff to overflow
the 54-bit startoff field, leading to the assert.

Therefore, always check the rightmost extent to see if it would overflow
prior to invoking the insert range machinery.

Reported-by: zlang@redhat.com
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200137
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2018-06-24 11:56:36 -07:00
..
libxfs xfs: don't allow insert-range to shift extents past the maximum offset 2018-06-24 11:56:36 -07:00
scrub xfs: move various type verifiers to common file 2018-06-08 10:07:51 -07:00
Kconfig xfs: implement the metadata repair ioctl flag 2018-05-15 18:12:50 -07:00
kmem.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
kmem.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
Makefile xfs: move various type verifiers to common file 2018-06-08 10:07:51 -07:00
mrlock.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_acl.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_acl.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_aops.c Changes since last update: 2018-06-12 15:49:00 -07:00
xfs_aops.h Changes since last update: 2018-06-12 15:49:00 -07:00
xfs_attr.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_attr_inactive.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_attr_list.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_bmap_item.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_bmap_item.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_bmap_util.c xfs: don't allow insert-range to shift extents past the maximum offset 2018-06-24 11:56:36 -07:00
xfs_bmap_util.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_buf.c xfs: xfs_reflink_convert_cow() memory allocation deadlock 2018-06-08 10:07:51 -07:00
xfs_buf.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_buf_item.c xfs: clean up MIN/MAX 2018-06-08 10:07:52 -07:00
xfs_buf_item.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_dir2_readdir.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_discard.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_discard.h
xfs_dquot.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_dquot.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_dquot_item.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_dquot_item.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_error.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_error.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_export.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_export.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_extent_busy.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_extent_busy.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_extfree_item.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_extfree_item.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_file.c Changes since last update: 2018-06-12 15:49:00 -07:00
xfs_filestream.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_filestream.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_fsmap.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_fsmap.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_fsops.c xfs: don't trip over negative free space in xfs_reserve_blocks 2018-06-24 11:56:36 -07:00
xfs_fsops.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_globals.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_icache.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_icache.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_icreate_item.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_icreate_item.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_inode.c xfs: xfs_iflush_abort() can be called twice on cluster writeback failure 2018-06-21 23:31:38 -07:00
xfs_inode.h Changes since last update: 2018-06-12 15:49:00 -07:00
xfs_inode_item.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_inode_item.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_ioctl.c Changes since last update: 2018-06-12 15:49:00 -07:00
xfs_ioctl.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_ioctl32.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_ioctl32.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_iomap.c xfs: clean up MIN/MAX 2018-06-08 10:07:52 -07:00
xfs_iomap.h xfs: replace do_mod with native operations 2018-06-08 10:07:52 -07:00
xfs_iops.c vfs/y2038: inode timestamps conversion to timespec64 2018-06-15 07:31:07 +09:00
xfs_iops.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_itable.c xfs: clean up MIN/MAX 2018-06-08 10:07:52 -07:00
xfs_itable.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_linux.h xfs: replace do_mod with native operations 2018-06-08 10:07:52 -07:00
xfs_log.c xfs: clean up MIN/MAX 2018-06-08 10:07:52 -07:00
xfs_log.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_log_cil.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_log_priv.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_log_recover.c xfs: replace do_mod with native operations 2018-06-08 10:07:52 -07:00
xfs_message.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_message.h
xfs_mount.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_mount.h xfs: clean up MIN/MAX 2018-06-08 10:07:52 -07:00
xfs_mru_cache.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_mru_cache.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_ondisk.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_pnfs.c xfs: prepare xfs_break_layouts() for another layout type 2018-05-22 07:19:08 -07:00
xfs_pnfs.h xfs: prepare xfs_break_layouts() for another layout type 2018-05-22 07:19:08 -07:00
xfs_qm.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_qm.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_qm_bhv.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_qm_syscalls.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_quota.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_quotaops.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_refcount_item.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_refcount_item.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_reflink.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_reflink.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_rmap_item.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_rmap_item.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_rtalloc.c xfs: replace do_mod with native operations 2018-06-08 10:07:52 -07:00
xfs_rtalloc.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_stats.c Changes since last update: 2018-06-12 15:49:00 -07:00
xfs_stats.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_super.c Changes since last update: 2018-06-12 15:49:00 -07:00
xfs_super.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_symlink.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_symlink.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_sysctl.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_sysctl.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_sysfs.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_sysfs.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_trace.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_trace.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_trans.c xfs: allow empty transactions while frozen 2018-06-24 11:56:35 -07:00
xfs_trans.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_trans_ail.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_trans_bmap.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_trans_buf.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_trans_dquot.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_trans_extfree.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_trans_inode.c vfs/y2038: inode timestamps conversion to timespec64 2018-06-15 07:31:07 +09:00
xfs_trans_priv.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_trans_refcount.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_trans_rmap.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00
xfs_xattr.c xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00