提交 75dd3b9e 编写于 作者: H Heinz Mauelshagen 提交者: Mike Snitzer

dm raid: more restricting data_offset value checks

Signed-off-by: NHeinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
上级 5fa146b2
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册