]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/rvt: Fix potential memory leak caused by rvt_alloc_rq
authorAditya Pakki <pakki001@umn.edu>
Sun, 14 Jun 2020 04:11:48 +0000 (23:11 -0500)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 18 Jun 2020 12:35:47 +0000 (09:35 -0300)
commit197dd874806724bbdfd8d53a3f4d3591d5cb6f73
tree3d746d55a30d6d89678e8b04e8305c3fd693f2d4
parentb077027544208eba43c99178211960e88ea51bd7
RDMA/rvt: Fix potential memory leak caused by rvt_alloc_rq

In case of failure of alloc_ud_wq_attr(), the memory allocated by
rvt_alloc_rq() is not freed. Fix it by calling rvt_free_rq() using the
existing clean-up code.

Fixes: 85734f83e28f ("IB/{rdmavt, hfi1, qib}: Remove AH refcount for UD QPs")
Link: https://lore.kernel.org/r/20200614041148.131983-1-pakki001@umn.edu
Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/sw/rdmavt/qp.c