From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: YueHaibing <yuehaibing@huawei.com>,
liangwenpeng@huawei.com, liweihang@huawei.com,
dledford@redhat.com, chenglang@huawei.com,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] RDMA/hns: Fix return in hns_roce_rereg_user_mr()
Date: Thu, 5 Aug 2021 15:30:15 +0300 [thread overview]
Message-ID: <YQvZ14oSAYEuSTA3@unreal> (raw)
In-Reply-To: <20210805122311.GJ543798@ziepe.ca>
On Thu, Aug 05, 2021 at 09:23:11AM -0300, Jason Gunthorpe wrote:
> On Thu, Aug 05, 2021 at 01:58:53PM +0300, Leon Romanovsky wrote:
>
> > > IMO, if ibv_rereg_mr failed, the mr is in undefined state, user
> > > needs to call ibv_dereg_mr in order to release it, so there no
> > > need to recover the original state.
> >
> > The thing is that it undefined state in the kernel. What will be if
> > user will change access_flags and try to use that "broken" MR
> > anyway? Will you catch it?
>
> rereg is not atomic, if the rereg fails in the middle the mr should be
> left in some safe state.
It is not the case in the hns flow, they leave such MR in limbo state.
>
> Jason
next prev parent reply other threads:[~2021-08-05 12:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-04 12:59 [PATCH -next] RDMA/hns: Fix return in hns_roce_rereg_user_mr() YueHaibing
2021-08-04 13:53 ` Leon Romanovsky
2021-08-05 2:36 ` YueHaibing
2021-08-05 3:40 ` Leon Romanovsky
2021-08-05 9:29 ` YueHaibing
2021-08-05 10:58 ` Leon Romanovsky
2021-08-05 12:23 ` Jason Gunthorpe
2021-08-05 12:30 ` Leon Romanovsky [this message]
2021-08-19 14:18 ` 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=YQvZ14oSAYEuSTA3@unreal \
--to=leon@kernel.org \
--cc=chenglang@huawei.com \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=liangwenpeng@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=liweihang@huawei.com \
--cc=yuehaibing@huawei.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.