mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 06:16:56 +07:00
dm raid: more restricting data_offset value checks
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
parent
5fa146b25b
commit
75dd3b9ecb
@ -1221,7 +1221,8 @@ static int parse_raid_params(struct raid_set *rs, struct dm_arg_set *as,
|
||||
return -EINVAL;
|
||||
}
|
||||
/* Ensure sensible data offset */
|
||||
if (value < 0) {
|
||||
if (value < 0 ||
|
||||
(value && (value < MIN_FREE_RESHAPE_SPACE || value % to_sector(PAGE_SIZE)))) {
|
||||
rs->ti->error = "Bogus data_offset value";
|
||||
return -EINVAL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user