Re: Zero Divide in Kernel 3.12-rc4
On Tue, Oct 22, 2013 at 10:38 PM, Michael Schmitz
<schmitz@biophys.uni-duesseldorf.de> wrote:
>>>> To pinpoint where in sd_completed_bytes this happens, I'd need the
>>>> sd_mod
>>>> module and the module symbol map.
>>>
>>>
>>> /* be careful ... don't want any overflows */
>>> u64 factor = scmd->device->sector_size / 512;
>>> do_div(start_lba, factor);
>>> do_div(end_lba, factor);
>>>
>>> scmd->device->sector_size should be 512, so factor should be 1.
>
>
> Looking at a bit of context right above what you quote here, we can be
> reasonably certain that scmd->device->sector_size is greater or equal 512.
Stupid me, I missed that check ;-)
Perhaps the "u64" is still an issue there, despite Andreas' fix for do_div()?
> Ingo - could you add
>
> if (scmd->device->sector_size > 2048)
> sdev_printk(KERN_ERR, scmd->device, "Whoa - large secor size %d\n",
> scmd->device->sector_size);
>
> before the do_div calls, and see what that reports?
Anyway, if it triggers again, I'd like to see the real kernel binary
that matches
the crash log.
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
Reply to: