Linux NFS development
 help / color / mirror / Atom feed
* [PATCH] SVCRDMA: Add check for XPT_CLOSE in svc_rdma_send
@ 2008-03-11 17:44 Tom Tucker
       [not found] ` <1205257467.4795.3.camel-SMNkleLxa3ZimH42XvhXlA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tucker @ 2008-03-11 17:44 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: linux-nfs

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>
---

This is not a critical fix for 2.6.25, but part of a general clean up of the error paths.

 net/sunrpc/xprtrdma/svc_rdma_transport.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index 16fd3f6..af408fc 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -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 */


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-11 19:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-11 17:44 [PATCH] SVCRDMA: Add check for XPT_CLOSE in svc_rdma_send Tom Tucker
     [not found] ` <1205257467.4795.3.camel-SMNkleLxa3ZimH42XvhXlA@public.gmane.org>
2008-03-11 18:32   ` J. Bruce Fields
2008-03-11 19:23     ` Tom Tucker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox