• Jason Gunthorpe's avatar
    IB/uverbs: Allow RDMA_REMOVE_DESTROY to work concurrently with disassociate · 7452a3c7
    Jason Gunthorpe authored
    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>
    7452a3c7
rdma_core.c 26.1 KB