[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210625124812.GS2371267@nvidia.com>
Date: Fri, 25 Jun 2021 09:48:12 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Anand Khoje <anand.a.khoje@...cle.com>
Cc: linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
dledford@...hat.com, haakon.bugge@...cle.com, leon@...nel.org
Subject: Re: [PATCH v5 for-next 3/3] IB/core: Obtain subnet_prefix from cache
in IB devices
On Fri, Jun 25, 2021 at 11:33:58AM +0530, Anand Khoje wrote:
>
> If the above change is to be made, there could arise a scenario in which:
> In case of a cache_update event, another application/module could try to
> call ib_query_port() and read subnet_prefix while the cache is still getting
> updated and the application/module could end up reading a stale value of
> subnet_prefix.
Applications relying on this data must hook the event and update their
state when the event fires.
So long as ib_query_port returns the correct value in the event
handler it is all OK. This whole thing is racy - the HW can change the
subnet_prefix at anytime, this is just shuffling the race around.
> - Is it possible that different GIDs in the gid_table will have different
> values of subnet_prefix?
Valid GIDs should have the same prefix
Jason
Powered by blists - more mailing lists