Messages in this thread | | | Date | Tue, 13 Aug 2013 14:12:04 +0200 | Subject | Re: btrfs zero divide | From | Geert Uytterhoeven <> |
| |
On Fri, Aug 9, 2013 at 2:30 PM, Andreas Schwab <schwab@linux-m68k.org> wrote: > Andreas Schwab <schwab@linux-m68k.org> writes: >> Josef Bacik <jbacik@fusionio.com> writes: >>> So stripe_len shouldn't be 0, if it is you have bigger problems :).
[ lost context: this is about the first do_div() in __btrfs_map_block() ]
>> The bigger problem is that stripe_nr is u64, this is completely bogus. >> The first operand of do_div must be u32. This goes through the whole >> file. > > Of course, what I meant was that the *second* operand must be u32, but > that doesn't change my point.
I checked all do_div() implementations, and (unless I missed one) m68k and mn10300 were the only two that didn't truncate base to 32 bits.
Mn10300 is little endian, so I think the problem won't happen there.
Andreas, I'll apply your patch (http://permalink.gmane.org/gmane.linux.ports.m68k/5008) with the crash log added to the commit message, so it's appropriate for -stable.
Gr{oetje,eeting}s,
Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
| |