summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mlx4/cq.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2019-01-09 21:15:59 +0300
committerJason Gunthorpe <jgg@mellanox.com>2019-01-11 03:08:52 +0300
commit0975890ebe9b40abf08fecf216aed4f92805db70 (patch)
treec85212f9269f3594a3e6905327e91dd56b3de1af /drivers/infiniband/hw/mlx4/cq.c
parent8cbfaac3d0974ecf53b28db23ea8c105f491bb35 (diff)
downloadlinux-0975890ebe9b40abf08fecf216aed4f92805db70.tar.xz
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/cq.c')
-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);