]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
RDS: Properly unmap when getting a remote access error
authorSherman Pun <sherman.pun@sun.com>
Tue, 9 Mar 2010 20:36:19 +0000 (12:36 -0800)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 7 Jul 2015 23:41:22 +0000 (16:41 -0700)
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>
net/rds/ib_send.c

index da7bd53cdf467fd090d78b9178c669d0dfd385cd..b55cecde0406d0c1a030ea94fa675714624c10f5 100644 (file)
@@ -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;