summaryrefslogtreecommitdiff
path: root/net/rds/ib_send.c
diff options
context:
space:
mode:
authorSherman Pun <sherman.pun@sun.com>2010-03-11 13:50:05 (GMT)
committerDavid S. Miller <davem@davemloft.net>2010-03-17 04:17:00 (GMT)
commit450d06c0208ad195ccd74a7edd11321e316791ad (patch)
tree92abe1897ad7ab857e091475bcb84227af01962a /net/rds/ib_send.c
parentb98ba52f96e7cdb4dbe2b06bced83d95d94c9d02 (diff)
downloadlinux-fsl-qoriq-450d06c0208ad195ccd74a7edd11321e316791ad.tar.xz
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 <andy.grover@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/ib_send.c')
-rw-r--r--net/rds/ib_send.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c
index c18228a..17fa808 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;