summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2019-01-09 19:15:59 +0100
committerJason Gunthorpe <jgg@mellanox.com>2019-01-11 01:08:52 +0100
commit0975890ebe9b40abf08fecf216aed4f92805db70 (patch)
treec85212f9269f3594a3e6905327e91dd56b3de1af /drivers/infiniband/hw/mlx4
parentRDMA: Clear PD objects during their allocation (diff)
downloadlinux-0975890ebe9b40abf08fecf216aed4f92805db70.tar.xz
linux-0975890ebe9b40abf08fecf216aed4f92805db70.zip
RDMA: Clear CQ objects during their allocation
As part of an audit process to update drivers to use rdma_restrack_add() ensure that CQ objects is cleared before access. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4')
-rw-r--r--drivers/infiniband/hw/mlx4/cq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c
index db936c12b5bd..03ac72339dd2 100644
--- a/drivers/infiniband/hw/mlx4/cq.c
+++ b/drivers/infiniband/hw/mlx4/cq.c
@@ -190,7 +190,7 @@ struct ib_cq *mlx4_ib_create_cq(struct ib_device *ibdev,
if (attr->flags & ~CQ_CREATE_FLAGS_SUPPORTED)
return ERR_PTR(-EINVAL);
- cq = kmalloc(sizeof *cq, GFP_KERNEL);
+ cq = kzalloc(sizeof(*cq), GFP_KERNEL);
if (!cq)
return ERR_PTR(-ENOMEM);