Skip to content
Commit 7452a3c7 authored by Jason Gunthorpe's avatar Jason Gunthorpe
Browse files

IB/uverbs: Allow RDMA_REMOVE_DESTROY to work concurrently with disassociate



After all the recent structural changes this is now straightfoward, hoist
the hw_destroy_rwsem up out of rdma_destroy_explicit and wrap it around
the uobject write lock as well as the destroy.

This is necessary as obtaining a write lock concurrently with
uverbs_destroy_ufile_hw() will cause malfunction.

After this change none of the destroy callbacks require the
disassociate_srcu lock to be correct.

This requires introducing a new lookup mode, UVERBS_LOOKUP_DESTROY as the
IOCTL interface needs to hold an unlocked kref until all command
verification is completed.

Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 9867f5c6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment