diff options
author | Jubin John <jubin.john@intel.com> | 2016-04-20 15:05:24 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-04-28 22:32:27 +0200 |
commit | ea0e4ce3bcccef360e1aa69d17a210d1221ab80c (patch) | |
tree | bd953d1fb81e220892cb3421f811b4f68f4b10f4 /include/rdma/rdma_vt.h | |
parent | IB/hfi1: Fix buffer cache races which may cause corruption (diff) | |
download | linux-ea0e4ce3bcccef360e1aa69d17a210d1221ab80c.tar.xz linux-ea0e4ce3bcccef360e1aa69d17a210d1221ab80c.zip |
IB/rdmavt,hfi1,qib: Fix memory leak
rdi->ports has memory allocated in rvt_alloc_device(), but does not get
freed because the hfi1 and qib drivers drivers call ib_dealloc_device()
directly instead of going through rdmavt. Add a rvt_dealloc_device()
that frees rdi->ports and then calls ib_dealloc_device(). Switch hfi1
and qib drivers to calling rvt_dealloc_device() instead of
ib_dealloc_device() directly.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Brian Welty <brian.welty@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma/rdma_vt.h')
-rw-r--r-- | include/rdma/rdma_vt.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h index a8696551abb1..d57ceee90d26 100644 --- a/include/rdma/rdma_vt.h +++ b/include/rdma/rdma_vt.h @@ -467,6 +467,7 @@ static inline struct rvt_qp *rvt_lookup_qpn(struct rvt_dev_info *rdi, } struct rvt_dev_info *rvt_alloc_device(size_t size, int nports); +void rvt_dealloc_device(struct rvt_dev_info *rdi); int rvt_register_device(struct rvt_dev_info *rvd); void rvt_unregister_device(struct rvt_dev_info *rvd); int rvt_check_ah(struct ib_device *ibdev, struct ib_ah_attr *ah_attr); |