iw_cxgb4: Fix qpid leak
authorNirranjan Kirubaharan <nirranjan@chelsio.com>
Thu, 23 May 2019 07:05:39 +0000 (00:05 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 27 May 2019 17:58:24 +0000 (14:58 -0300)
commitf70baa7ee3d1b5a9e66ac7549e31641a656f23c1
tree71d54827b617e43e8dfbdb2d571fafc264acd459
parentcae626b97851afc2219e7607183a9a23cbba3bef
iw_cxgb4: Fix qpid leak

Add await in destroy_qp() so that all references to qp are dereferenced
and qp is freed in destroy_qp() itself.  This ensures freeing of all QPs
before invocation of dealloc_ucontext(), which prevents loss of in use
qpids stored in the ucontext.

Signed-off-by: Nirranjan Kirubaharan <nirranjan@chelsio.com>
Reviewed-by: Potnuri Bharat Teja <bharat@chelsio.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/cxgb4/iw_cxgb4.h
drivers/infiniband/hw/cxgb4/qp.c