OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2017 16:08:48 +0000 (09:08 -0700)
commit31cd127ca69a1aedd24b9aa7ac806e6071c84655
tree3de3062ec8247747959bf4be8cd167bbcb7f1f84
parentbad9f6142ce1141b7e4969d898cf0e2d61e90d5b
ext4: fix overflow caused by missing cast in ext4_resize_fs()

commit aec51758ce10a9c847a62a48a168f8c804c6e053 upstream.

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: 1c6bd7173d66
Signed-off-by: Jerry Lee <jerrylee@qnap.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/resize.c