• Max Gurtovoy's avatar
    nvme-rdma: fix memory leak during queue allocation · eb1bd249
    Max Gurtovoy authored
    In case nvme_rdma_wait_for_cm timeout expires before we get
    an established or rejected event (rdma_connect succeeded) from
    rdma_cm, we end up with leaking the ib transport resources for
    dedicated queue. This scenario can easily reproduced using traffic
    test during port toggling.
    Also, in order to protect from parallel ib queue destruction, that
    may be invoked from different context's, introduce new flag that
    stands for transport readiness. While we're here, protect also against
    a situation that we can receive rdma_cm events during ib queue destruction.
    Signed-off-by: default avatarMax Gurtovoy <maxg@mellanox.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    eb1bd249
rdma.c 51.8 KB