android_kernel_samsung_univ.../fs/ext4
Theodore Ts'o a66e985716 ext4: check for allocation block validity with block group locked
commit 8d5a803c6a6ce4ec258e31f76059ea5153ba46ef upstream.

With commit 044e6e3d74a3: "ext4: don't update checksum of new
initialized bitmaps" the buffer valid bit will get set without
actually setting up the checksum for the allocation bitmap, since the
checksum will get calculated once we actually allocate an inode or
block.

If we are doing this, then we need to (re-)check the verified bit
after we take the block group lock.  Otherwise, we could race with
another process reading and verifying the bitmap, which would then
complain about the checksum being invalid.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1780137

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-06 16:24:40 +02:00
..
acl.c ext4: Don't clear SGID when inheriting ACLs 2017-10-12 11:27:35 +02:00
acl.h
balloc.c ext4: check for allocation block validity with block group locked 2018-08-06 16:24:40 +02:00
bitmap.c
block_validity.c
crypto_fname.c
crypto_key.c fscrypt: lock mutex before checking for bounce page pool 2017-11-30 08:37:25 +00:00
crypto_policy.c
crypto.c
dir.c
ext4_crypto.h
ext4_extents.h ext4: verify the depth of extent tree in ext4_find_extent() 2018-07-11 16:03:48 +02:00
ext4_jbd2.c
ext4_jbd2.h
ext4.h ext4: add more inode number paranoia checks 2018-07-11 16:03:49 +02:00
extents_status.c
extents_status.h
extents.c ext4: verify the depth of extent tree in ext4_find_extent() 2018-07-11 16:03:48 +02:00
file.c ext4: fix off-by-one on max nr_pages in ext4_find_unwritten_pgoff() 2018-04-13 19:50:11 +02:00
fsync.c
hash.c
ialloc.c ext4: check for allocation block validity with block group locked 2018-08-06 16:24:40 +02:00
indirect.c
inline.c ext4: fix inline data updates with checksums enabled 2018-08-06 16:24:40 +02:00
inode.c ext4: fix inline data updates with checksums enabled 2018-08-06 16:24:40 +02:00
ioctl.c
Kconfig
Makefile
mballoc.c ext4: only look at the bg_flags field if it is valid 2018-07-11 16:03:48 +02:00
mballoc.h
migrate.c
mmp.c
move_extent.c fs: add i_blocksize() 2017-06-14 13:16:24 +02:00
namei.c do d_instantiate/unlock_new_inode combinations safely 2018-05-30 07:48:52 +02:00
page-io.c
readpage.c
resize.c ext4: fix fencepost error in check for inode count overflow during resize 2018-07-03 11:21:25 +02:00
super.c ext4: check superblock mapped prior to committing 2018-07-11 16:03:49 +02:00
symlink.c don't put symlink bodies in pagecache into highmem 2018-02-16 20:09:38 +01:00
sysfs.c ext4: check return value of kstrtoull correctly in reserved_clusters_store 2017-07-15 11:57:50 +02:00
truncate.h
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c ext4: fix deadlock between inline_data and ext4_expand_extra_isize_ea() 2018-04-24 09:32:10 +02:00
xattr.h ext4: fix deadlock between inline_data and ext4_expand_extra_isize_ea() 2018-04-24 09:32:10 +02:00