Skip to content

Commit

Permalink
RDS: Properly unmap when getting a remote access error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sherman Pun authored and David S. Miller committed Mar 17, 2010
1 parent b98ba52 commit 450d06c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion net/rds/ib_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 450d06c

Please sign in to comment.