diff mbox series

[for-next,v13,1/6] RDMA/rxe: Warn if mcast memory is not freed

Message ID 20220223230706.50332-2-rpearsonhpe@gmail.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series Move two object pools to rxe_mcast.c | expand

Commit Message

Bob Pearson Feb. 23, 2022, 11:07 p.m. UTC
Print a warning if memory allocated by mcast
is not cleared when the rxe driver is unloaded.

Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
---
 drivers/infiniband/sw/rxe/rxe.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
index 3520eb2db685..fce3994d8f7a 100644
--- a/drivers/infiniband/sw/rxe/rxe.c
+++ b/drivers/infiniband/sw/rxe/rxe.c
@@ -29,6 +29,8 @@  void rxe_dealloc(struct ib_device *ib_dev)
 	rxe_pool_cleanup(&rxe->mr_pool);
 	rxe_pool_cleanup(&rxe->mw_pool);
 
+	WARN_ON(!RB_EMPTY_ROOT(&rxe->mcg_tree));
+
 	if (rxe->tfm)
 		crypto_free_shash(rxe->tfm);
 }