]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Detect invalid empty messages in core dm instead of requiring every target to
authorAlasdair G Kergon <agk@redhat.com>
Mon, 25 Jul 2011 00:50:00 +0000 (10:50 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 25 Jul 2011 00:50:00 +0000 (10:50 +1000)
check this.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-ioctl.c

index 03f8af5d244af3dbf7b6736bce92abc89c548b91..2e9a3ca37bdd39c6cbaf36f800b77aa3a04a638f 100644 (file)
@@ -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;