diff options
author | Heinz Mauelshagen <heinzm@redhat.com> | 2016-06-15 22:27:08 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2016-07-18 15:37:19 -0400 |
commit | 75dd3b9ecb027e90261ed4052e155e0c1236d717 (patch) | |
tree | a62e1f12e02dcb80cfd0b6fd69dfd1556350de11 /drivers/md/dm-raid.c | |
parent | 5fa146b25ba86682f74e3060debd4c4d3073561b (diff) | |
download | linux-75dd3b9ecb027e90261ed4052e155e0c1236d717.tar.bz2 |
dm raid: more restricting data_offset value checks
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-raid.c')
-rw-r--r-- | drivers/md/dm-raid.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index a38298589db8..b1dbf28f36d2 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -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; } |