Re: [PATCH v2 1/2] block: avoid possible overflow for chunk_sectors check in blk_stack_limits()

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

 



On 7/29/25 18:14, John Garry wrote:
> In blk_stack_limits(), we check that the t->chunk_sectors value is a
> multiple of the t->physical_block_size value.
> 
> However, by finding the chunk_sectors value in bytes, we may overflow
> the unsigned int which holds chunk_sectors, so change the check to be
> based on sectors.
> 
> Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
> Reviewed-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
> Signed-off-by: John Garry <john.g.garry@xxxxxxxxxx>

Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx>


-- 
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