All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Mark Zhang <markzhang@nvidia.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/cma: Split apart the multiple uses of the same list heads
Date: Thu, 16 Sep 2021 11:17:59 -0300	[thread overview]
Message-ID: <20210916141759.GC327412@nvidia.com> (raw)
In-Reply-To: <67155640-e38d-ed1a-5af9-693f9c860f21@nvidia.com>

On Thu, Sep 16, 2021 at 01:11:14PM +0800, Mark Zhang wrote:
> > @@ -4928,10 +4930,10 @@ static void cma_process_remove(struct cma_device *cma_dev)
> >          mutex_lock(&lock);
> >          while (!list_empty(&cma_dev->id_list)) {
> >                  struct rdma_id_private *id_priv = list_first_entry(
> > -                       &cma_dev->id_list, struct rdma_id_private, list);
> > +                       &cma_dev->id_list, struct rdma_id_private, device_item);
> > 
> > -               list_del(&id_priv->listen_list);
> > -               list_del_init(&id_priv->list);
> > +               list_del_init(&id_priv->listen_item);
> 
> Should it still be
>     list_del(&id_priv->listen_list);
> as it isn't dev_id_priv?

Yes, probably should stay here, but it isn't entirely sane

The next code block must trigger the list_del or the
wait_for_completion() below will block forever.

The whole RDMA_CM_EVENT_DEVICE_REMOVAL bit is kind of insane and needs
some cleaning. For instance I think it is a bug if any ULP doesn't
return 1 from the event.

Jason

  reply	other threads:[~2021-09-16 14:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 16:25 [PATCH] RDMA/cma: Split apart the multiple uses of the same list heads Jason Gunthorpe
2021-09-16  5:11 ` Mark Zhang
2021-09-16 14:17   ` Jason Gunthorpe [this message]
2021-10-04 19:39   ` Jason Gunthorpe
2021-10-04 19:43 ` 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=20210916141759.GC327412@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=markzhang@nvidia.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.