All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Pearson <rpearsonhpe@gmail.com>
To: jgg@nvidia.com, zyjzyj2000@gmail.com, linux-rdma@vger.kernel.org
Cc: Bob Pearson <rpearsonhpe@gmail.com>
Subject: [PATCH for-next v13 1/6] RDMA/rxe: Warn if mcast memory is not freed
Date: Wed, 23 Feb 2022 17:07:03 -0600	[thread overview]
Message-ID: <20220223230706.50332-2-rpearsonhpe@gmail.com> (raw)
In-Reply-To: <20220223230706.50332-1-rpearsonhpe@gmail.com>

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 --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);
 }
-- 
2.32.0


  reply	other threads:[~2022-02-23 23:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 23:07 [PATCH for-next v13 0/6] Move two object pools to rxe_mcast.c Bob Pearson
2022-02-23 23:07 ` Bob Pearson [this message]
2022-02-23 23:07 ` [PATCH v13 for-next 2/6] RDMA/rxe: Collect mca init code in a subroutine Bob Pearson
2022-02-23 23:07 ` [PATCH for-next v13 3/6] RDMA/rxe: Collect cleanup mca " Bob Pearson
2022-02-23 23:07 ` [PATCH v13 for-next 4/6] RDMA/rxe: Cleanup rxe_mcast.c Bob Pearson
2022-02-23 23:07 ` [PATCH v13 for-next 5/6] RDMA/rxe: For mcast copy qp list to temp array Bob Pearson
2022-02-24  0:26   ` Jason Gunthorpe
2022-02-24 17:29     ` Bob Pearson
2022-02-23 23:07 ` [PATCH for-next v13 6/6] RDMA/rxe: Convert mca read locking to RCU Bob Pearson
2022-02-24  0:28   ` Jason Gunthorpe
2022-02-24  0:32 ` [PATCH for-next v13 0/6] Move two object pools to rxe_mcast.c Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220223230706.50332-2-rpearsonhpe@gmail.com \
    --to=rpearsonhpe@gmail.com \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=zyjzyj2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.