aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/vmw_pvrdma
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2019-01-09 20:15:58 +0200
committerJason Gunthorpe <jgg@mellanox.com>2019-01-10 17:08:52 -0700
commit8cbfaac3d0974ecf53b28db23ea8c105f491bb35 (patch)
treea3daca92f03d2f7e68bfe88215296e1c48960f86 /drivers/infiniband/hw/vmw_pvrdma
parentRDMA/qedr: Fix out of bounds index check in query pkey (diff)
downloadlinux-dev-8cbfaac3d0974ecf53b28db23ea8c105f491bb35.tar.xz
linux-dev-8cbfaac3d0974ecf53b28db23ea8c105f491bb35.zip
RDMA: Clear PD objects during their allocation
As part of an audit process to update drivers to use rdma_restrack_add() ensure that PD 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/vmw_pvrdma')
-rw-r--r--drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c
index 4d238d0e484b..65b6115caa55 100644
--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c
+++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c
@@ -457,7 +457,7 @@ struct ib_pd *pvrdma_alloc_pd(struct ib_device *ibdev,
if (!atomic_add_unless(&dev->num_pds, 1, dev->dsr->caps.max_pd))
return ERR_PTR(-ENOMEM);
- pd = kmalloc(sizeof(*pd), GFP_KERNEL);
+ pd = kzalloc(sizeof(*pd), GFP_KERNEL);
if (!pd) {
ptr = ERR_PTR(-ENOMEM);
goto err;