mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
bitmap: test bitmap_parselist() with a group size close to UINT_MAX
Add bitmap_parselist() cases where the group size makes start + group_len overflow an unsigned int. Before "bitmap: bitmap_parselist(): don't wrap around on a huge group size" the region walk wrapped around and also set bit 0. Assisted-by: LLM Signed-off-by: Shashank Mohan Jain <[email protected]> Signed-off-by: Yury Norov <[email protected]>
This commit is contained in:
committed by
Yury Norov
parent
d075c4dc0b
commit
452a6d5b5e
@@ -502,6 +502,8 @@ static const struct test_bitmap_parselist parselist_tests[] __initconst = {
|
||||
{0, "0-N:1/3,1-N:1/3,2-N:1/3", &exp1[8 * step], 32, 0},
|
||||
{0, "0-31:1/3,1-31:1/3,2-31:1/3", &exp1[8 * step], 32, 0},
|
||||
{0, "1-10:8/12,8-31:24/29,0-31:0/3", &exp1[9 * step], 32, 0},
|
||||
{0, "1-1:1/4294967295", &exp1[1 * step], 32, 0},
|
||||
{0, "15-15:1/4294967281", &exp1[13 * step], 32, 0},
|
||||
|
||||
{0, "all", &exp1[8 * step], 32, 0},
|
||||
{0, "0, 1, all, ", &exp1[8 * step], 32, 0},
|
||||
|
||||
Reference in New Issue
Block a user