[PATCH v3 hmm 08/12] mm/hmm: Remove racy protection against double-unregistration
jgg at ziepe.ca
Tue Jun 18 13:13:24 UTC 2019
On Sat, Jun 15, 2019 at 07:16:12AM -0700, Christoph Hellwig wrote:
> On Thu, Jun 13, 2019 at 09:44:46PM -0300, Jason Gunthorpe wrote:
> > From: Jason Gunthorpe <jgg at mellanox.com>
> > No other register/unregister kernel API attempts to provide this kind of
> > protection as it is inherently racy, so just drop it.
> > Callers should provide their own protection, it appears nouveau already
> > does, but just in case drop a debugging POISON.
> I don't even think we even need to bother with the POISON, normal list
> debugging will already catch a double unregistration anyway.
mirror->hmm isn't a list so list debugging won't help.
My concern when I wrote this was that one of the in flight patches I
can't see might be depending on this double-unregister-is-safe
behavior, so I wanted them to crash reliably.
It is a really overly conservative thing to do..
More information about the amd-gfx