]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: avoid divide by zero when trying to mount a corrupted file system
authorTheodore Ts'o <tytso@mit.edu>
Mon, 23 Nov 2009 12:24:46 +0000 (07:24 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Dec 2009 17:44:49 +0000 (09:44 -0800)
commit8ed33ff5203300ac8878042bc4d4954e2f40c488
tree9bd4b327e09c09771eb923f83f6e56e57efb0ecc
parent6662a8d03104516c53170257b837d8a03e86db39
ext4: avoid divide by zero when trying to mount a corrupted file system

(cherry picked from commit 503358ae01b70ce6909d19dd01287093f6b6271c)

If s_log_groups_per_flex is greater than 31, then groups_per_flex will
will overflow and cause a divide by zero error.  This can cause kernel
BUG if such a file system is mounted.

Thanks to Nageswara R Sastry for analyzing the failure and providing
an initial patch.

http://bugzilla.kernel.org/show_bug.cgi?id=14287

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/super.c