From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Dmitry Vyukov <dvyukov@google.com>,
linux-rdma@vger.kernel.org,
syzbot+dc3dfba010d7671e05f5@syzkaller.appspotmail.com
Subject: Re: [PATCH rc] RDMA/cma: Ensure rdma_addr_cancel() happens before issuing more requests
Date: Thu, 23 Sep 2021 08:49:06 +0300 [thread overview]
Message-ID: <YUwVUjrqT2PyVEO7@unreal> (raw)
In-Reply-To: <20210922144119.GV327412@nvidia.com>
On Wed, Sep 22, 2021 at 11:41:19AM -0300, Jason Gunthorpe wrote:
> On Wed, Sep 22, 2021 at 11:01:39AM +0300, Leon Romanovsky wrote:
>
> > > + /* The FSM can return back to RDMA_CM_ADDR_BOUND after
> > > + * rdma_resolve_ip() is called, eg through the error
> > > + * path in addr_handler. If this happens the existing
> > > + * request must be canceled before issuing a new one.
> > > + */
> > > + if (id_priv->used_resolve_ip)
> > > + rdma_addr_cancel(&id->route.addr.dev_addr);
> > > + else
> > > + id_priv->used_resolve_ip = 1;
> >
> > Why don't you never clear this field?
>
> The only case where it can be cleared is if we have called
> rdma_addr_cancel(), and since this is the only place that does it and
> immediately calls rdma_resolve_ip() again, there is no reason to ever
> clear it.
IMHO, it is better to clear instead to rely on "the only place" semantic.
Thanks
>
> Jason
next prev parent reply other threads:[~2021-09-23 5:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 18:34 [PATCH rc] RDMA/cma: Ensure rdma_addr_cancel() happens before issuing more requests Jason Gunthorpe
2021-09-22 8:01 ` Leon Romanovsky
2021-09-22 9:38 ` Haakon Bugge
2021-09-22 14:44 ` Jason Gunthorpe
2021-09-22 14:41 ` Jason Gunthorpe
2021-09-23 5:49 ` Leon Romanovsky [this message]
2021-09-23 11:45 ` Jason Gunthorpe
2021-09-23 18:15 ` Leon Romanovsky
2021-09-23 20:03 ` Jason Gunthorpe
2021-09-23 23:17 ` Leon Romanovsky
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=YUwVUjrqT2PyVEO7@unreal \
--to=leon@kernel.org \
--cc=dvyukov@google.com \
--cc=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=syzbot+dc3dfba010d7671e05f5@syzkaller.appspotmail.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.