projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fa146b
)
dm raid: more restricting data_offset value checks
author
Heinz Mauelshagen
<heinzm@redhat.com>
Wed, 15 Jun 2016 20:27:08 +0000
(22:27 +0200)
committer
Mike Snitzer
<snitzer@redhat.com>
Mon, 18 Jul 2016 19:37:19 +0000
(15:37 -0400)
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-raid.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/md/dm-raid.c
b/drivers/md/dm-raid.c
index a38298589db865a7c57c137275c7044b12ac661f..b1dbf28f36d2c81d6a9f368a2b8e969f05ef4620 100644
(file)
--- 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;
}