• Jason Gunthorpe's avatar
    RDMA/rxe: Close a race after ib_register_device · ca22354b
    Jason Gunthorpe authored
    Since rxe allows unregistration from other threads the rxe pointer can
    become invalid any moment after ib_register_driver returns. This could
    cause a user triggered use after free.
    
    Add another driver callback to be called right after the device becomes
    registered to complete any device setup required post-registration.  This
    callback has enough core locking to prevent the device from becoming
    unregistered.
    Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
    ca22354b
rxe_net.c 15.4 KB