Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75dd3b9e authored by Heinz Mauelshagen's avatar Heinz Mauelshagen Committed by Mike Snitzer
Browse files

dm raid: more restricting data_offset value checks

parent 5fa146b2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
			}