ext4: always check block group bounds in ext4_init_block_bitmap()
authorTheodore Ts'o <tytso@mit.edu>
Thu, 14 Jun 2018 03:00:48 +0000 (23:00 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jul 2018 14:26:44 +0000 (16:26 +0200)
commitcdde876fce2501828af33d5e4faa36c8919fc96a
treee2d22e1524c40519595ecd1263678c820a2fa1bc
parent9e4842f2aa6c4b4340669730c90cb6fbf630ee42
ext4: always check block group bounds in ext4_init_block_bitmap()

commit 819b23f1c501b17b9694325471789e6b5cc2d0d2 upstream.

Regardless of whether the flex_bg feature is set, we should always
check to make sure the bits we are setting in the block bitmap are
within the block group bounds.

https://bugzilla.kernel.org/show_bug.cgi?id=199865

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/balloc.c