From: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com>
To: linux-ext4 <linux-ext4@vger.kernel.org>
Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>,
sachin p sant <sachinp@linux.vnet.ibm.com>,
Ramon <rcvalle@linux.vnet.ibm.com>
Subject: Re: [OOPs] ext4: fixpoint divide exception at ext4_fill_super+0x141c/0x2908
Date: Wed, 04 Nov 2009 18:10:24 +0530 [thread overview]
Message-ID: <4AF17638.7010105@linux.vnet.ibm.com> (raw)
In-Reply-To: <4A93792C.2000705@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 698 bytes --]
Hi,
The following bug exists in 2.6.32-rc* also.
> ------------[ cut here ]------------
> Kernel BUG at 000003e00429d934 [verbose debug info unavailable]
> fixpoint divide exception: 0009 [#1] SMP
Please find the patch which solves the following 'fixpoint divide
exception'. I tested the same and not seeing any KERNEL BUG/exception.
I created the patch from 2.6.32-rc6 code.
Thanks and Regards
R.Nageswara Sastry
Though the 'sbi->s_log_groups_per_flex' contains valid data after the
shift operation 'groups_per_flex' is becoming zero, which later used as
a divisor.
groups_per_flex = 1 << sbi->s_log_groups_per_flex
Signed-off-by: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com>
[-- Attachment #2: ext4_fix_point_division_error.patch --]
[-- Type: text/plain, Size: 813 bytes --]
diff -Naurp a/linux-2.6.32-rc6/fs/ext4/super.c b/linux-2.6.32-rc6/fs/ext4/super.c
--- a/linux-2.6.32-rc6/fs/ext4/super.c 2009-11-03 20:37:49.000000000 +0100
+++ b/linux-2.6.32-rc6/fs/ext4/super.c 2009-11-04 13:21:48.000000000 +0100
@@ -1681,6 +1681,12 @@ static int ext4_fill_flex_info(struct su
sbi->s_log_groups_per_flex = sbi->s_es->s_log_groups_per_flex;
groups_per_flex = 1 << sbi->s_log_groups_per_flex;
+ /* There are some situations, after shift the value of 'groups_per_flex'
+ can become zero and division with 0 will result in fixpoint divide exception
+ */
+ if (groups_per_flex == 0)
+ return 1;
+
/* We allocate both existing and potentially added groups */
flex_group_count = ((sbi->s_groups_count + groups_per_flex - 1) +
((le16_to_cpu(sbi->s_es->s_reserved_gdt_blocks) + 1) <<
next prev parent reply other threads:[~2009-11-04 12:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-25 5:39 [OOPs] ext4: fixpoint divide exception at ext4_fill_super+0x141c/0x2908 Nageswara R Sastry
2009-11-04 12:40 ` Nageswara R Sastry [this message]
2009-11-04 13:54 ` Nageswara R Sastry
2009-11-06 19:48 ` Theodore Tso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AF17638.7010105@linux.vnet.ibm.com \
--to=rnsastry@linux.vnet.ibm.com \
--cc=kamalesh@linux.vnet.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=rcvalle@linux.vnet.ibm.com \
--cc=sachinp@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.