Skip to content

Commit

Permalink
dm ioctl: prevent empty message
Browse files Browse the repository at this point in the history
Detect invalid empty messages in core dm instead of requiring every target to
check this.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
Alasdair G Kergon committed Aug 2, 2011
1 parent 13c8758 commit 2ca4c92
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/md/dm-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,11 @@ static int target_message(struct dm_ioctl *param, size_t param_size)
goto out;
}

if (!argc) {
DMWARN("Empty message received.");
goto out;
}

table = dm_get_live_table(md);
if (!table)
goto out_argv;
Expand Down

0 comments on commit 2ca4c92

Please sign in to comment.