diff options
author | John Garry <john.g.garry@oracle.com> | 2025-07-29 09:14:47 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-07-29 06:24:45 -0600 |
commit | 448dfecc7ff807822ecd47a5c052acedca7d09e8 (patch) | |
tree | f452e8dfa243734bd7499c3f0391aa22d09c57f5 /rust/helpers/bug.c | |
parent | 459779d04ae8dfd4083679a7bf9d72af165d1023 (diff) |
block: avoid possible overflow for chunk_sectors check in blk_stack_limits()
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>
Link: https://lore.kernel.org/r/20250729091448.1691334-2-john.g.garry@oracle.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/helpers/bug.c')
0 files changed, 0 insertions, 0 deletions