summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtrdma/verbs.c
diff options
context:
space:
mode:
authorChuck Lever2017-06-08 17:51:56 +0200
committerAnna Schumaker2017-07-13 22:00:10 +0200
commit4b196dc6fee9ba838ebabf824e294a429c79b27d (patch)
tree075fb31c1d415171267a652574eea3b139c96253 /net/sunrpc/xprtrdma/verbs.c
parentxprtrdma: On invalidation failure, remove MWs from rl_registered (diff)
downloadkernel-qcow2-linux-4b196dc6fee9ba838ebabf824e294a429c79b27d.tar.gz
kernel-qcow2-linux-4b196dc6fee9ba838ebabf824e294a429c79b27d.tar.xz
kernel-qcow2-linux-4b196dc6fee9ba838ebabf824e294a429c79b27d.zip
xprtrdma: Pre-mark remotely invalidated MRs
There are rare cases where an rpcrdma_req and its matched rpcrdma_rep can be re-used, via rpcrdma_buffer_put, while the RPC reply handler is still using that req. This is typically due to a signal firing at just the wrong instant. As part of closing this race window, avoid using the wrong rpcrdma_rep to detect remotely invalidated MRs. Mark MRs as invalidated while we are sure the rep is still OK to use. BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=305 Fixes: 68791649a725 ('xprtrdma: Invalidate in the RPC reply ... ') Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/verbs.c')
-rw-r--r--net/sunrpc/xprtrdma/verbs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 3dbce9ac4327..a8be66d806dc 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -1187,6 +1187,7 @@ rpcrdma_get_mw(struct rpcrdma_xprt *r_xprt)
if (!mw)
goto out_nomws;
+ mw->mw_flags = 0;
return mw;
out_nomws: