linux-stable/fs/ext4
Jan Kara e45ab2d6a8 ext4: fix fencepost error in check for inode count overflow during resize
commit 4f2f76f751 upstream.

ext4_resize_fs() has an off-by-one bug when checking whether growing of
a filesystem will not overflow inode count. As a result it allows a
filesystem with 8192 inodes per group to grow to 64TB which overflows
inode count to 0 and makes filesystem unusable. Fix it.

Cc: stable@vger.kernel.org
Fixes: 3f8a6411fb
Reported-by: Jaco Kroon <jaco@uls.co.za>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-26 08:08:07 +08:00
..
acl.c ext4: Don't clear SGID when inheriting ACLs 2017-10-12 11:51:26 +02:00
acl.h
balloc.c ext4: fix bitmap position validation 2018-05-01 15:13:03 -07:00
bitmap.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
block_validity.c ext4: add missing KERN_CONT to a few more debugging uses 2016-10-15 09:57:31 -04:00
dir.c ext4: remove unused variable 2016-09-30 02:14:56 -04:00
ext4.h ext4: sanity check the block and cluster size at mount time 2016-11-19 20:58:15 -05:00
ext4_extents.h ext4: fix misspellings in comments. 2016-03-09 23:49:05 -05:00
ext4_jbd2.c ext4: fix potential use after free in __ext4_journal_stop 2015-10-17 22:57:06 -04:00
ext4_jbd2.h ext4: do not perform data journaling when data is encrypted 2017-01-06 10:40:14 +01:00
extents.c ext4: prevent right-shifting extents beyond EXT_MAX_BLOCKS 2018-05-01 15:13:03 -07:00
extents_status.c ext4: remove trailing \n from ext4_warning/ext4_error calls 2016-04-27 01:11:21 -04:00
extents_status.h ext4: move procfs registration code to fs/ext4/sysfs.c 2015-09-23 12:46:17 -04:00
file.c ext4: fix off-by-one on max nr_pages in ext4_find_unwritten_pgoff() 2018-04-13 19:48:06 +02:00
fsync.c ext4: cleanup ext4_sync_parent() 2016-09-05 23:21:43 -04:00
hash.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
ialloc.c ext4: add validity checks for bitmap block numbers 2018-05-01 15:13:03 -07:00
indirect.c ext4: fix hole length detection in ext4_ind_map_blocks() 2018-06-26 08:08:07 +08:00
inline.c ext4: mark inode dirty after converting inline directory 2017-03-30 09:41:25 +02:00
inode.c ext4: update mtime in ext4_punch_hole even if no blocks are released 2018-06-26 08:08:07 +08:00
ioctl.c Lots of bug fixes and cleanups. 2016-10-07 15:15:33 -07:00
Kconfig ext4 crypto: migrate into vfs's crypto engine 2016-07-10 14:01:03 -04:00
Makefile ext4 crypto: migrate into vfs's crypto engine 2016-07-10 14:01:03 -04:00
mballoc.c ext4: handle the rest of ext4_mb_load_buddy() ENOMEM errors 2018-04-13 19:48:02 +02:00
mballoc.h ext4: add missing KERN_CONT to a few more debugging uses 2016-10-15 09:57:31 -04:00
migrate.c ext4: fix misspellings in comments. 2016-03-09 23:49:05 -05:00
mmp.c fs: have submit_bh users pass in op and flags separately 2016-06-07 13:41:38 -06:00
move_extent.c fs: add i_blocksize() 2017-06-14 15:06:00 +02:00
namei.c do d_instantiate/unlock_new_inode combinations safely 2018-05-30 07:50:16 +02:00
page-io.c fs: use mapping_set_error instead of opencoded set_bit 2016-10-11 15:06:33 -07:00
readpage.c Merge branch 'akpm' (patches from Andrew) 2016-07-26 19:55:54 -07:00
resize.c ext4: fix fencepost error in check for inode count overflow during resize 2018-06-26 08:08:07 +08:00
super.c ext4: don't allow r/w mounts if metadata blocks overlap the superblock 2018-04-24 09:34:15 +02:00
symlink.c Merge branch 'work.xattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-10-10 17:11:50 -07:00
sysfs.c ext4: check return value of kstrtoull correctly in reserved_clusters_store 2017-07-15 12:16:16 +02:00
truncate.h ext4: fix races between page faults and hole punching 2015-12-07 14:28:03 -05:00
xattr.c ext4: inplace xattr block update fails to deduplicate blocks 2018-03-18 11:18:54 +01:00
xattr.h ext4: fix deadlock between inline_data and ext4_expand_extra_isize_ea() 2017-03-12 06:41:41 +01:00
xattr_security.c switch xattr_handler->set() to passing dentry and inode separately 2016-05-27 15:39:43 -04:00
xattr_trusted.c switch xattr_handler->set() to passing dentry and inode separately 2016-05-27 15:39:43 -04:00
xattr_user.c switch xattr_handler->set() to passing dentry and inode separately 2016-05-27 15:39:43 -04:00