• Sébastien Dugué's avatar
    ib_uverbs: Fix pages leak when using XRC SRQs · a233c4b5
    Sébastien Dugué authored
    Hello,
    
      When an application using XRCs abruptly terminates, the mmaped pages
    of the CQ buffers are leaked.
    
      This comes from the fact that when resources are released in
    ib_uverbs_cleanup_ucontext(), we fail to release the CQs because their
    refcount is not 0.
    
      When creating an XRC SRQ, we increment the associated CQ refcount.
    This refcount is only decremented when the SRQ is released.
    
      Therefore we need to release the SRQs prior to the CQs to make sure
    that all references to the CQs are gone before trying to release these.
    Signed-off-by: default avatarSebastien Dugue <sebastien.dugue@bull.net>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    a233c4b5
uverbs_main.c 27.2 KB