aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/dm-ioctl.c6
-rw-r--r--include/linux/dm-ioctl.h5
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index b441d82c338a..ba5d8f7cc5f2 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -700,7 +700,7 @@ static int dev_rename(struct dm_ioctl *param, size_t param_size)
700 int r; 700 int r;
701 char *new_name = (char *) param + param->data_start; 701 char *new_name = (char *) param + param->data_start;
702 702
703 if (new_name < (char *) (param + 1) || 703 if (new_name < (char *) param->data ||
704 invalid_str(new_name, (void *) param + param_size)) { 704 invalid_str(new_name, (void *) param + param_size)) {
705 DMWARN("Invalid new logical volume name supplied."); 705 DMWARN("Invalid new logical volume name supplied.");
706 return -EINVAL; 706 return -EINVAL;
@@ -726,7 +726,7 @@ static int dev_set_geometry(struct dm_ioctl *param, size_t param_size)
726 if (!md) 726 if (!md)
727 return -ENXIO; 727 return -ENXIO;
728 728
729 if (geostr < (char *) (param + 1) || 729 if (geostr < (char *) param->data ||
730 invalid_str(geostr, (void *) param + param_size)) { 730 invalid_str(geostr, (void *) param + param_size)) {
731 DMWARN("Invalid geometry supplied."); 731 DMWARN("Invalid geometry supplied.");
732 goto out; 732 goto out;
@@ -1233,7 +1233,7 @@ static int target_message(struct dm_ioctl *param, size_t param_size)
1233 if (r) 1233 if (r)
1234 goto out; 1234 goto out;
1235 1235
1236 if (tmsg < (struct dm_target_msg *) (param + 1) || 1236 if (tmsg < (struct dm_target_msg *) param->data ||
1237 invalid_str(tmsg->message, (void *) param + param_size)) { 1237 invalid_str(tmsg->message, (void *) param + param_size)) {
1238 DMWARN("Invalid target message parameters."); 1238 DMWARN("Invalid target message parameters.");
1239 r = -EINVAL; 1239 r = -EINVAL;
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h
index b93486107821..523281c5b7f5 100644
--- a/include/linux/dm-ioctl.h
+++ b/include/linux/dm-ioctl.h
@@ -131,6 +131,7 @@ struct dm_ioctl {
131 char name[DM_NAME_LEN]; /* device name */ 131 char name[DM_NAME_LEN]; /* device name */
132 char uuid[DM_UUID_LEN]; /* unique identifier for 132 char uuid[DM_UUID_LEN]; /* unique identifier for
133 * the block device */ 133 * the block device */
134 char data[7]; /* padding or data */
134}; 135};
135 136
136/* 137/*
@@ -285,9 +286,9 @@ typedef char ioctl_struct[308];
285#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) 286#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
286 287
287#define DM_VERSION_MAJOR 4 288#define DM_VERSION_MAJOR 4
288#define DM_VERSION_MINOR 11 289#define DM_VERSION_MINOR 12
289#define DM_VERSION_PATCHLEVEL 0 290#define DM_VERSION_PATCHLEVEL 0
290#define DM_VERSION_EXTRA "-ioctl (2006-10-12)" 291#define DM_VERSION_EXTRA "-ioctl (2007-10-02)"
291 292
292/* Status bits */ 293/* Status bits */
293#define DM_READONLY_FLAG (1 << 0) /* In/Out */ 294#define DM_READONLY_FLAG (1 << 0) /* In/Out */