]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
IB/uverbs: Initialize ib_qp_init_attr with zeros
authorMaor Gottlieb <maorg@mellanox.com>
Wed, 22 Jun 2016 14:27:25 +0000 (17:27 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 23 Jun 2016 14:03:57 +0000 (10:03 -0400)
Initialize ib_qp_init_attr with zeros in order to avoid from garbage
in fields that won't be set with user values.

Fixes: a060b5629ab06 ('IB/core: generic RDMA READ/WRITE API')
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/uverbs_cmd.c

index 1a8babb8ee3c4d328af7e08063cef8f147086a10..825021d1008b9a13ee5a3b02ed0a1dd7ce80d0ee 100644 (file)
@@ -1747,7 +1747,7 @@ static int create_qp(struct ib_uverbs_file *file,
        struct ib_srq                   *srq = NULL;
        struct ib_qp                    *qp;
        char                            *buf;
-       struct ib_qp_init_attr          attr;
+       struct ib_qp_init_attr          attr = {};
        struct ib_uverbs_ex_create_qp_resp resp;
        int                             ret;