]> git.karo-electronics.de Git - linux-beck.git/commitdiff
IB/vmw_pvrdma: Don't leak info from alloc_ucontext
authorAdit Ranadive <aditr@vmware.com>
Thu, 19 Jan 2017 21:20:39 +0000 (13:20 -0800)
committerDoug Ledford <dledford@redhat.com>
Tue, 24 Jan 2017 19:15:28 +0000 (14:15 -0500)
Clear out the user response struct correctly.

Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Adit Ranadive <aditr@vmware.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c

index 54891370d18a5beef151816c882b40fb705a9ec5..c2aa52638dcb81ea4539b61c43d61f55edefb2b3 100644 (file)
@@ -306,7 +306,7 @@ struct ib_ucontext *pvrdma_alloc_ucontext(struct ib_device *ibdev,
        union pvrdma_cmd_resp rsp;
        struct pvrdma_cmd_create_uc *cmd = &req.create_uc;
        struct pvrdma_cmd_create_uc_resp *resp = &rsp.create_uc_resp;
-       struct pvrdma_alloc_ucontext_resp uresp;
+       struct pvrdma_alloc_ucontext_resp uresp = {0};
        int ret;
        void *ptr;