ext4: add sanity checking to count_overhead()
authorTheodore Ts'o <tytso@mit.edu>
Fri, 18 Nov 2016 18:37:47 +0000 (13:37 -0500)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 Jun 2017 18:28:15 +0000 (20:28 +0200)
commitd61f4e22b4d2946ffb60e2ea61716681f247076c
treea80472514c3e864ccbafb44fb5edad780ee96734
parentbd652ad14e9b9839f05f95117a00906af97b833f
ext4: add sanity checking to count_overhead()

commit c48ae41bafe31e9a66d8be2ced4e42a6b57fa814 upstream.

The commit "ext4: sanity check the block and cluster size at mount
time" should prevent any problems, but in case the superblock is
modified while the file system is mounted, add an extra safety check
to make sure we won't overrun the allocated buffer.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Willy Tarreau <w@1wt.eu>
fs/ext4/super.c