From aa877ea10e84252d1aedbcc4cbc67730909d8294 Mon Sep 17 00:00:00 2001 From: Eldad Zinger Date: Sun, 10 Oct 2010 11:50:12 +0200 Subject: [PATCH] sdp: BUG2144 - first free rx_sa before sending SendSM otherwise a new rx_sa might be alloced before the old one is removed. Signed-off-by: Eldad Zinger --- drivers/infiniband/ulp/sdp/sdp_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c index fd6e00c14bb8..e6599d079d86 100644 --- a/drivers/infiniband/ulp/sdp/sdp_main.c +++ b/drivers/infiniband/ulp/sdp/sdp_main.c @@ -2256,8 +2256,8 @@ static int sdp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, sdp_dbg_data(sk, "Aborting SA " "due to SACancel or " "no fmr pool\n"); - sdp_post_sendsm(sk); sdp_abort_rx_srcavail(sk); + sdp_post_sendsm(sk); rx_sa = NULL; if (offset < skb->len) { sdp_prf(sk, skb, "Converted SA to DATA"); @@ -2417,8 +2417,8 @@ sdp_mid_data: err = sdp_rdma_to_iovec(sk, msg->msg_iov, skb, &used, offset); if (unlikely(err)) { - sdp_post_sendsm(sk); sdp_abort_rx_srcavail(sk); + sdp_post_sendsm(sk); rx_sa = NULL; if (err == -EAGAIN || err == -ETIME) goto skb_cleanup; -- 2.50.1