summaryrefslogtreecommitdiff
path: root/drivers/infiniband/sw
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2019-01-09 21:16:01 +0300
committerJason Gunthorpe <jgg@mellanox.com>2019-01-11 03:08:52 +0300
commit081de9495c7a90560e9cc264cdcc2ff39b705843 (patch)
tree7d0f16131df305e845698b85f06d02977e5bbf52 /drivers/infiniband/sw
parent0975890ebe9b40abf08fecf216aed4f92805db70 (diff)
downloadlinux-081de9495c7a90560e9cc264cdcc2ff39b705843.tar.xz
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/sw')
-rw-r--r--drivers/infiniband/sw/rdmavt/vt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rdmavt/vt.c b/drivers/infiniband/sw/rdmavt/vt.c
index aef3aa3fe667..8724a1817158 100644
--- a/drivers/infiniband/sw/rdmavt/vt.c
+++ b/drivers/infiniband/sw/rdmavt/vt.c
@@ -304,7 +304,7 @@ static struct ib_ucontext *rvt_alloc_ucontext(struct ib_device *ibdev,
{
struct rvt_ucontext *context;
- context = kmalloc(sizeof(*context), GFP_KERNEL);
+ context = kzalloc(sizeof(*context), GFP_KERNEL);
if (!context)
return ERR_PTR(-ENOMEM);
return &context->ibucontext;