]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix overflow caused by missing cast in ext4_resize_fs()
authorJerry Lee <jerrylee@qnap.com>
Sun, 6 Aug 2017 05:18:31 +0000 (01:18 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 6 Aug 2017 05:18:31 +0000 (01:18 -0400)
commit98d3d967009a88aa23575f5fb3d6b7fb97dd8a89
treea832c2ad23820173519a3cd79796636eafbe36e3
parent5373ab829d4c53a44ddd7a90e451ac967b0f125f
ext4: fix overflow caused by missing cast in ext4_resize_fs()

On a 32-bit platform, the value of n_blcoks_count may be wrong during
the file system is resized to size larger than 2^32 blocks.  This may
caused the superblock being corrupted with zero blocks count.

Fixes: 2a0bccdc92ff
Signed-off-by: Jerry Lee <jerrylee@qnap.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org # 3.7+
fs/ext4/resize.c