RE: [PATCH] fix disk geometry calculation for large disks

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

 



> Testing with multi-terabyte disks shows that HDIO_GETGEO sometimes
> returns heads=0. This causes parted to die with a Floating Point
> Exception, among other possible effects.
>
> The problem occurs because several routines in scsicam_bios_param cast
> sector_t capacity to unsigned long.
>
> The attached patch avoids this, by checking first to see if
> the capacity
> exceeds the maximum allowed values for cylinder/sector/head
> (65535*63*255). If so, just return those values right away.

I brought up this issue a few months ago
(http://marc.theaimsgroup.com/?t=110383771000001&r=1&w=2), but no one
replied.  There are actually many other drivers with custom bios_param()
routines that should be reviewed as well.

Anthony J. Battersby
Cybernetics

-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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