From: Alasdair G Kergon Date: Mon, 25 Jul 2011 00:50:00 +0000 (+1000) Subject: Detect invalid empty messages in core dm instead of requiring every target to X-Git-Tag: next-20110726~30^2~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=352c210f3f78b197b89d5261bd86cf49d7656b7d;p=karo-tx-linux.git Detect invalid empty messages in core dm instead of requiring every target to check this. Signed-off-by: Alasdair G Kergon --- diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 03f8af5d244a..2e9a3ca37bdd 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -1424,6 +1424,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;