Re: [patch 3/5] scsi disk: report size without overflow

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

 



On Fri, 28 Oct 2005 akpm@xxxxxxxx wrote:

>
> From: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
>
> With CONFIG_LBD=n, 'sz' (32 bits) can overflow when capacity is multiplied
> (even * 2), as seen in a report from Dale Blount on lkml.  Also make sure
> that 'mb' will not overflow.
>
> Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
> Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
> ---
>
>  drivers/scsi/sd.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)

James has a version that doesn't require 64-bit operations
(when CONFIG_LBD=n, on x86-32) that he prefers, I believe.

-- 
~Randy
-
: 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