* [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[parent not found: <1205257467.4795.3.camel-SMNkleLxa3ZimH42XvhXlA@public.gmane.org>]
* Re: [PATCH] SVCRDMA: Add check for XPT_CLOSE in svc_rdma_send [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 0 siblings, 1 reply; 3+ messages in thread From: J. Bruce Fields @ 2008-03-11 18:32 UTC (permalink / raw) To: Tom Tucker; +Cc: linux-nfs On Tue, Mar 11, 2008 at 12:44:27PM -0500, Tom Tucker wrote: > 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. OK, thanks; I've applied this, and passed along the other two to Linus. --b. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] SVCRDMA: Add check for XPT_CLOSE in svc_rdma_send 2008-03-11 18:32 ` J. Bruce Fields @ 2008-03-11 19:23 ` Tom Tucker 0 siblings, 0 replies; 3+ messages in thread From: Tom Tucker @ 2008-03-11 19:23 UTC (permalink / raw) To: J. Bruce Fields; +Cc: linux-nfs On Tue, 2008-03-11 at 14:32 -0400, J. Bruce Fields wrote: > On Tue, Mar 11, 2008 at 12:44:27PM -0500, Tom Tucker wrote: > > 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. > > OK, thanks; I've applied this, and passed along the other two to Linus. Awesome, thanks. > > --b. ^ permalink raw reply [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 an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.