Skip to content

Commit

Permalink
SVCRDMA: Add check for XPT_CLOSE in svc_rdma_send
Browse files Browse the repository at this point in the history
SVCRDMA: Add check for XPT_CLOSE in svc_rdma_send

The svcrdma transport can crash if a send is waiting for an
empty SQ slot and the connection is closed due to an asynchronous error.
The crash is caused when svc_rdma_send attempts to send on a deleted
QP.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
Tom Tucker authored and J. Bruce Fields committed Apr 23, 2008
1 parent 9167f50 commit 830bb59
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/sunrpc/xprtrdma/svc_rdma_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,8 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr)
wait_event(xprt->sc_send_wait,
atomic_read(&xprt->sc_sq_count) <
xprt->sc_sq_depth);
if (test_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags))
return 0;
continue;
}
/* Bumped used SQ WR count and post */
Expand Down

0 comments on commit 830bb59

Please sign in to comment.