All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: zyjzyj2000@gmail.com, linux-rdma@vger.kernel.org
Subject: Re: [PATCH for-next v12 6/6] RDMA/rxe: Convert mca read locking to RCU
Date: Wed, 23 Feb 2022 20:04:46 -0400	[thread overview]
Message-ID: <20220224000446.GA409228@nvidia.com> (raw)
In-Reply-To: <34b05c41-c674-7120-8d0c-0ceedab50b50@gmail.com>

On Wed, Feb 23, 2022 at 04:40:19PM -0600, Bob Pearson wrote:

> OK I looked at this again. Here is what happens.
> 
> without the complete()/wait_for_completion() fix the test passes but
> the (private i.e. not visible to rdma-core) mca object is holding a
> reference on qp which will be freed after the call_rcu() subroutine
> takes place.  Meanwhile the ib_detach_mcast() call returns to
> rdma-core and since there is nothing left to do the test is over and
> the python code closes the device. But this generates a warning
> (rdma_core.c line 940) since not all the user objects (i.e. the qp)
> were freed. In other contexts we are planning on putting
> complete()/wait...()'s in all the other verbs calls which ref count
> objects for the same reason. I think it applies here too.

This explanation makes sense..

The mistake is on the QP side where it has a refcount but doesn't wait
for it to drain I suppose.

Jason

      reply	other threads:[~2022-02-24  0:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-18  0:35 [PATCH for-next v12 0/6] Move two object pools to rxe_mcast.c Bob Pearson
2022-02-18  0:35 ` [PATCH for-next v12 1/6] RDMA/rxe: Add code to cleanup mcast memory Bob Pearson
2022-02-23 19:33   ` Jason Gunthorpe
2022-02-18  0:35 ` [PATCH for-next v12 2/6] RDMA/rxe: Collect mca init code in a subroutine Bob Pearson
2022-02-18  0:35 ` [PATCH for-next v12 3/6] RDMA/rxe: Collect cleanup mca " Bob Pearson
2022-02-18  0:35 ` [PATCH for-next v12 4/6] RDMA/rxe: Cleanup rxe_mcast.c Bob Pearson
2022-02-18  0:35 ` [PATCH for-next v12 5/6] RDMA/rxe: For mcast copy qp list to temp array Bob Pearson
2022-02-18  0:35 ` [PATCH for-next v12 6/6] RDMA/rxe: Convert mca read locking to RCU Bob Pearson
2022-02-23 19:52   ` Jason Gunthorpe
2022-02-23 22:40     ` Bob Pearson
2022-02-24  0:04       ` Jason Gunthorpe [this message]

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=20220224000446.GA409228@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearsonhpe@gmail.com \
    --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.