diff mbox series

[RFC] xprtrdma: Release in-flight MRs on disconnect

Message ID 159767751439.190071.13659900216337230912.stgit@manet.1015granger.net
State New
Headers show
Series [RFC] xprtrdma: Release in-flight MRs on disconnect | expand

Commit Message

Chuck Lever Aug. 17, 2020, 3:19 p.m. UTC
Dan Aloni reports that when a server disconnects abruptly, a few
memory regions are left DMA mapped. Over time this leak could pin
enough I/O resources to slow or even deadlock an NFS/RDMA client.

I found that if a transport disconnects before pending Send and
FastReg WRs can be posted, the to-be-registered MRs are stranded on
the req's rl_registered list and never released -- since they
weren't posted, there's no Send completion to DMA unmap them.

Reported-by: Dan Aloni <dan@kernelim.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
 net/sunrpc/xprtrdma/verbs.c |    2 ++
 1 file changed, 2 insertions(+)

Hi Dan, does this help?
diff mbox series


diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 95c66a339e34..53962e41896d 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -936,6 +936,8 @@  static void rpcrdma_req_reset(struct rpcrdma_req *req)
+	frwr_reset(req);
 /* ASSUMPTION: the rb_allreqs list is stable for the duration,