Tx complition resets "rdma_inflight->busy" and wakes up the recvmsg().
But rx_workqueue might get the lock of the socket before recvmsg(), so
SrcAvailCancel might be polled from the rx_cq, and since "busy = 0",
rx_sa wil be freed (w/o freeing umem&fmr).
Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
break;
case SDP_MID_SRCAVAIL_CANCEL:
if (ssk->rx_sa && after(ntohl(h->mseq), ssk->rx_sa->mseq) &&
- (!ssk->tx_ring.rdma_inflight ||
- !ssk->tx_ring.rdma_inflight->busy)) {
+ !ssk->tx_ring.rdma_inflight) {
sdp_dbg(sk, "Handling SrcAvailCancel - post SendSM\n");
RX_SRCAVAIL_STATE(ssk->rx_sa->skb) = NULL;
kfree(ssk->rx_sa);