]> git.baikalelectronics.ru Git - kernel.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)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 23 Nov 2009 12:24:46 +0000 (07:24 -0500)
commite0707636995c5ea84dcb7e11404333d0f9b62a25
treeef81060e38e5eb0895e9455892d5f8cf186a0603
parentf7eb1da60ac2474a72967dffae71b3523e95fa03
ext4: avoid divide by zero when trying to mount a corrupted file system

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>
Cc: stable@kernel.org
fs/ext4/super.c