Thread (7 messages) 7 messages, 4 authors, 2025-07-29

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

From: Damien Le Moal <dlemoal@kernel.org>
Date: 2025-07-29 11:05:48

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@suse.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>


-- 
Damien Le Moal
Western Digital Research
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help