• Roland Dreier's avatar
    [IB] uverbs: Fix up resource creation error paths · eb9d3cd5
    Roland Dreier authored
    By waiting to add resources to our lists until after the last
    operation that can fail, we don't have to remove them from their lists
    in the error path.  Also, we should hold the idr mutex until we know
    whether resource creation has succeed or failed, to avoid someone
    finding a resource in our table before we're ready.
    
    Loosely based on work by Robert Walsh <rjwalsh@pathscale.com>.
    Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
    eb9d3cd5
uverbs_cmd.c 30.6 KB