aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/dm-ioctl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index bf3d19a0fb78..d06dd39856f3 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1303,6 +1303,11 @@ static int target_message(struct dm_ioctl *param, size_t param_size)
1303 if (!table) 1303 if (!table)
1304 goto out_argv; 1304 goto out_argv;
1305 1305
1306 if (dm_deleting_md(md)) {
1307 r = -ENXIO;
1308 goto out_table;
1309 }
1310
1306 ti = dm_table_find_target(table, tmsg->sector); 1311 ti = dm_table_find_target(table, tmsg->sector);
1307 if (!dm_target_is_valid(ti)) { 1312 if (!dm_target_is_valid(ti)) {
1308 DMWARN("Target message sector outside device."); 1313 DMWARN("Target message sector outside device.");
@@ -1314,6 +1319,7 @@ static int target_message(struct dm_ioctl *param, size_t param_size)
1314 r = -EINVAL; 1319 r = -EINVAL;
1315 } 1320 }
1316 1321
1322 out_table:
1317 dm_table_put(table); 1323 dm_table_put(table);
1318 out_argv: 1324 out_argv:
1319 kfree(argv); 1325 kfree(argv);