divide by zero error in initio driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

the initio driver says in *_biosparam:
        info_array[0] = pTcb->TCS_DrvHead;
        info_array[1] = pTcb->TCS_DrvSector;
        info_array[2] = (unsigned long)capacity / pTcb->TCS_DrvHead / pTcb- + >TCS_DrvSector;

That causes a nice divide-by-zero error when one of these
happens to contain the right values of garbage -- I just connected
a few disks to my SCSI card, fired it up, and got a segfault fdisk'ing
two of my four new shiny SCA drives. :-/

What should happen in this case?
Fall back to fake 32/16 values?
Return an error?

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@xxxxxxxxxxxxxx
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
:red wire: n. [IBM] Patch wires installed by programmers who have no
   business mucking with the hardware. It is said that the only thing more
   dangerous than a hardware guy with a code patch is a {softy} with a
   soldering iron.... Compare {blue wire}, {yellow wire}, {purple wire}.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux