diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2019-01-09 19:15:58 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-01-11 01:08:52 +0100 |
commit | 8cbfaac3d0974ecf53b28db23ea8c105f491bb35 (patch) | |
tree | a3daca92f03d2f7e68bfe88215296e1c48960f86 /drivers/infiniband/sw | |
parent | RDMA/qedr: Fix out of bounds index check in query pkey (diff) | |
download | linux-8cbfaac3d0974ecf53b28db23ea8c105f491bb35.tar.xz linux-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/sw')
-rw-r--r-- | drivers/infiniband/sw/rdmavt/pd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rdmavt/pd.c b/drivers/infiniband/sw/rdmavt/pd.c index 8a89afff3363..dcc1870b8d23 100644 --- a/drivers/infiniband/sw/rdmavt/pd.c +++ b/drivers/infiniband/sw/rdmavt/pd.c @@ -66,7 +66,7 @@ struct ib_pd *rvt_alloc_pd(struct ib_device *ibdev, struct rvt_pd *pd; struct ib_pd *ret; - pd = kmalloc(sizeof(*pd), GFP_KERNEL); + pd = kzalloc(sizeof(*pd), GFP_KERNEL); if (!pd) { ret = ERR_PTR(-ENOMEM); goto bail; |