aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2019-01-09 20:16:01 +0200
committerJason Gunthorpe <jgg@mellanox.com>2019-01-10 17:08:52 -0700
commit081de9495c7a90560e9cc264cdcc2ff39b705843 (patch)
tree7d0f16131df305e845698b85f06d02977e5bbf52 /drivers/infiniband/hw/usnic/usnic_ib_verbs.c
parentRDMA: Clear CQ objects during their allocation (diff)
downloadlinux-dev-081de9495c7a90560e9cc264cdcc2ff39b705843.tar.xz
linux-dev-081de9495c7a90560e9cc264cdcc2ff39b705843.zip
RDMA: Clear CTX objects during their allocation
As part of an audit process to update drivers to use rdma_restrack_add() ensure that CTX 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/usnic/usnic_ib_verbs.c')
-rw-r--r--drivers/infiniband/hw/usnic/usnic_ib_verbs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
index 63c7b48774e9..432e6f6599fa 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
@@ -683,7 +683,7 @@ struct ib_ucontext *usnic_ib_alloc_ucontext(struct ib_device *ibdev,
struct usnic_ib_dev *us_ibdev = to_usdev(ibdev);
usnic_dbg("\n");
- context = kmalloc(sizeof(*context), GFP_KERNEL);
+ context = kzalloc(sizeof(*context), GFP_KERNEL);
if (!context)
return ERR_PTR(-ENOMEM);