diff options
Diffstat (limited to 'drivers/md/dm-ioctl.c')
-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 54ec737195e0..07d44e19536e 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c | |||
@@ -425,8 +425,8 @@ static void list_version_get_needed(struct target_type *tt, void *needed_param) | |||
425 | { | 425 | { |
426 | size_t *needed = needed_param; | 426 | size_t *needed = needed_param; |
427 | 427 | ||
428 | *needed += sizeof(struct dm_target_versions); | ||
428 | *needed += strlen(tt->name); | 429 | *needed += strlen(tt->name); |
429 | *needed += sizeof(tt->version); | ||
430 | *needed += ALIGN_MASK; | 430 | *needed += ALIGN_MASK; |
431 | } | 431 | } |
432 | 432 | ||
@@ -974,6 +974,7 @@ static int table_load(struct dm_ioctl *param, size_t param_size) | |||
974 | if (!hc) { | 974 | if (!hc) { |
975 | DMWARN("device doesn't appear to be in the dev hash table."); | 975 | DMWARN("device doesn't appear to be in the dev hash table."); |
976 | up_write(&_hash_lock); | 976 | up_write(&_hash_lock); |
977 | dm_table_put(t); | ||
977 | return -ENXIO; | 978 | return -ENXIO; |
978 | } | 979 | } |
979 | 980 | ||