From: Sherman Pun Date: Thu, 11 Mar 2010 13:50:05 +0000 (+0000) Subject: RDS: Properly unmap when getting a remote access error X-Git-Tag: v2.6.35-rc1~473^2~767 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=450d06c0208ad195ccd74a7edd11321e316791ad;p=karo-tx-linux.git RDS: Properly unmap when getting a remote access error If the RDMA op has aborted with a remote access error, in addition to what we already do (tell userspace it has completed with an error) also unmap it and put() the rm. Otherwise, hangs may occur on arches that track maps and will not exit without proper cleanup. Signed-off-by: Andy Grover Signed-off-by: David S. Miller --- diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c index c18228aec779..17fa80803ab0 100644 --- a/net/rds/ib_send.c +++ b/net/rds/ib_send.c @@ -243,8 +243,12 @@ void rds_ib_send_cq_comp_handler(struct ib_cq *cq, void *context) struct rds_message *rm; rm = rds_send_get_message(conn, send->s_op); - if (rm) + if (rm) { + if (rm->m_rdma_op) + rds_ib_send_unmap_rdma(ic, rm->m_rdma_op); rds_ib_send_rdma_complete(rm, wc.status); + rds_message_put(rm); + } } oldest = (oldest + 1) % ic->i_send_ring.w_nr;