]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
UBUNTU: SAUCE: ext4: check for allocation block validity with block group locked
authorTheodore Ts'o <tytso@mit.edu>
Mon, 16 Jul 2018 23:00:00 +0000 (01:00 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 17 Jul 2018 09:02:09 +0000 (11:02 +0200)
commit8df3cfc160cfa6bd7aeaa7930700ce78577aaa37
treee083070cc4699ffb59eca49b47f642395cc56cc9
parent23682a9a0fb8ddd72132e5324d564e788bdc6e45
UBUNTU: SAUCE: ext4: check for allocation block validity with block group locked

BugLink: https://bugs.launchpad.net/bugs/1781709
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: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Colin King <colin.king@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/ext4/balloc.c
fs/ext4/ialloc.c