Re: [PATCH] block: Fix potential overflow in blk_report_zones()

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

 



On 2019/07/09 22:37, Christoph Hellwig wrote:
> On Tue, Jul 09, 2019 at 04:53:48PM +0900, Damien Le Moal wrote:
>> For large values of the number of zones reported, the sector increment
>> calculated with "blk_queue_zone_sectors(q) * n" can overflow the
>> unsigned int type used. Fix this with a cast to sector_t type.
> 
> How about just returning a sector_t from blk_queue_zone_sectors, turning
> this into an automatic implicit cast for all callers?
> 

That works too. Will send an update.

-- 
Damien Le Moal
Western Digital Research




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux