diff options
-rw-r--r-- | drivers/md/dm-ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 54d0588fc1f6..977f36612e83 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c | |||
@@ -704,7 +704,8 @@ static int dev_rename(struct dm_ioctl *param, size_t param_size) | |||
704 | char *new_name = (char *) param + param->data_start; | 704 | char *new_name = (char *) param + param->data_start; |
705 | 705 | ||
706 | if (new_name < param->data || | 706 | if (new_name < param->data || |
707 | invalid_str(new_name, (void *) param + param_size)) { | 707 | invalid_str(new_name, (void *) param + param_size) || |
708 | strlen(new_name) > DM_NAME_LEN - 1) { | ||
708 | DMWARN("Invalid new logical volume name supplied."); | 709 | DMWARN("Invalid new logical volume name supplied."); |
709 | return -EINVAL; | 710 | return -EINVAL; |
710 | } | 711 | } |