]> git.baikalelectronics.ru Git - kernel.git/commit
xprtrdma: Pre-mark remotely invalidated MRs
authorChuck Lever <chuck.lever@oracle.com>
Thu, 8 Jun 2017 15:51:56 +0000 (11:51 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 13 Jul 2017 20:00:10 +0000 (16:00 -0400)
commit679f49b9f01ed51531bcd65c92a03a0055d883dd
tree075fb31c1d415171267a652574eea3b139c96253
parent31b5985c05625f16863e30076066e0d4320c19d6
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: 72a0eaaf1656 ('xprtrdma: Invalidate in the RPC reply ... ')
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/frwr_ops.c
net/sunrpc/xprtrdma/rpc_rdma.c
net/sunrpc/xprtrdma/verbs.c
net/sunrpc/xprtrdma/xprt_rdma.h