tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: cgdstrategy: divide fault in supervisor mode
alnsn%yandex.ru@localhost (Alexander Nasonov) writes:
>All mount/umount worked but when I ran reboot, the system trapped here:
>fatal integer divide fault in supervisor mode
>trap type 8 code 0 rip ffffffff808db36f cs 8 rflags 10246 cr2 efd...
>curlwp 0xfffffe81163b4a40 pid 276.1 lowest kstack 0xfffffe8117343...
>kernel: integer divide fault trap, code=0
>Stopped in pid 276.1 (reboot) at netbsd:cgdstrategy+0x26:
> if (bp->b_blkno < 0 ||
> (bp->b_bcount % dg->dg_secsize) != 0 ||
>ffffffff808db36b: 89 c8 mov %ecx,%eax
>ffffffff808db36d: 31 d2 xor %edx,%edx
>ffffffff808db36f: f7 77 40 divl 0x40(%rdi)
That would require dg_secsize to be 0 which is difficult to do
because the drivers initialize the value and the common disk_set_info()
function fixes up a zero value.
But maybe the dg pointer is bad? Please have a look at the %rdi
register.
N.B. there are some rare failure paths in getcgd_softc() that would
return a NULL pointer that isn't checked. If the kernel maps zeros
at NULL this could trigger a divide error here.
--
--
Michael van Elst
Internet: mlelstv%serpens.de@localhost
"A potential Snark may lurk in every tree."
Home |
Main Index |
Thread Index |
Old Index