public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
To: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
Cc: "Debian m68k" <debian-68k@lists.debian.org>,
	Linux/m68k <linux-m68k@vger.kernel.org>,
	tuomas.vainikka@kopteri.net,
	"Ingo Jürgensmann" <ij@2013.bluespice.org>,
	"Geert Uytterhoeven" <geert@linux-m68k.org>
Subject: Re: Zero Divide in Kernel 3.12-rc4
Date: Wed, 23 Oct 2013 09:38:08 +1300	[thread overview]
Message-ID: <9f57bf0fdf7329055ee5f7d2b2fe966d@biophys.uni-duesseldorf.de> (raw)
In-Reply-To: <335d2ba0b0b19e56b2880882a1c4c543@biophys.uni-duesseldorf.de>

Hi Geert,

>>> 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.

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?

Cheers,

	Michael

>>
>> Let's try a bit harder with a fresher mind and a cup of coffee and
>> a mini-twix:
>>
>>>> [77568.320000] PC: [<0484c33a>] sd_completed_bytes+0x90/0xe8 
>>>> [sd_mod]
>>>> [77568.330000] SR: 2000  SP: 00277e58  a2: 0027e2e4
>>>> [77568.340000] d0: 00000000    d1: 007735a0    d2: 00000000    d3: 
>>>> 00000001
>>>> [77568.350000] d4: 00000000    d5: 007735a8    a0: 024dd000    a1: 
>>>> 024a0ea0
>>
>>>> [77569.190000] Code: 4a80 6704 4c42 0001 2c01 2207 4c42 1406 <2c00> 
>>>> 2e01
>>>> 2004 2204 6704 4c42 0001 2801 2205 4c42 1404 2800 2a01 202e fff8 
>>>> 222e
>>
>> "4c42" is a division. It's the second one of the four divisions:
>>
>>    0: 4a80           tstl %d0
>>
>> d0 is zero, so the first division is skipped.
>>
>>    2: 6704           beqs 0x8
>>    4: 4c42 0001       divull %d2,%d1,%d0
>>    8: 2c01           movel %d1,%d6
>>    a: 2207           movel %d7,%d1
>>    c: 4c42 1406       divul %d2,%d6,%d1
>>
>> It's dividing by d2, which is zero. So scmd->device->sector_size must 
>> be
>> smaller than 512 (probably zero).
>>
>
> Thanks for parsing the dump - now I'll have to find out how on earth 
> sector_size got overwritten in the first place ... and whether 
> anyrhing in scmd-> device still makes any sense at all.
>
> Cheers,
>
> 	Michael
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-m68k" 
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-10-22 20:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-20  9:37 Zero Divide in Kernel 3.12-rc4 Ingo Jürgensmann
2013-10-20 10:10 ` Geert Uytterhoeven
2013-10-20 10:25   ` Ingo Jürgensmann
2013-10-20 10:33     ` Geert Uytterhoeven
2013-10-20 15:08   ` Thorsten Glaser
2013-10-21  7:34 ` Michael Schmitz
2013-10-21  8:40   ` Geert Uytterhoeven
2013-10-22  7:31     ` Michael Schmitz
2013-10-22 20:38       ` Michael Schmitz [this message]
2013-10-23 12:12         ` Ingo Jürgensmann
2013-10-24  4:56           ` Michael Schmitz
2013-11-03  6:55           ` Michael Schmitz
2013-11-03 22:10             ` Ingo Jürgensmann
2013-11-04  6:33               ` Michael Schmitz
2013-10-24  8:37         ` Geert Uytterhoeven

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=9f57bf0fdf7329055ee5f7d2b2fe966d@biophys.uni-duesseldorf.de \
    --to=schmitz@biophys.uni-duesseldorf.de \
    --cc=debian-68k@lists.debian.org \
    --cc=geert@linux-m68k.org \
    --cc=ij@2013.bluespice.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=tuomas.vainikka@kopteri.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox