[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YQvZ14oSAYEuSTA3@unreal>
Date: Thu, 5 Aug 2021 15:30:15 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: YueHaibing <yuehaibing@...wei.com>, liangwenpeng@...wei.com,
liweihang@...wei.com, dledford@...hat.com, chenglang@...wei.com,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] RDMA/hns: Fix return in hns_roce_rereg_user_mr()
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
Powered by blists - more mailing lists