]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xprtrdma: Fix rpcrdma_reqs_reset()
authorChuck Lever <chuck.lever@oracle.com>
Tue, 4 Jun 2024 19:45:23 +0000 (15:45 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 8 Jul 2024 17:47:24 +0000 (13:47 -0400)
commitacd9f2dd23c632568156217aac7a05f5a0313152
tree74e908a779653ce9b49892eee450fb05cb32e06e
parent49b29a573da83b65d5f4ecf2db6619bab7aa910c
xprtrdma: Fix rpcrdma_reqs_reset()

Avoid FastReg operations getting MW_BIND_ERR after a reconnect.

rpcrdma_reqs_reset() is called on transport tear-down to get each
rpcrdma_req back into a clean state.

MRs on req->rl_registered are waiting for a FastReg, are already
registered, or are waiting for invalidation. If the transport is
being torn down when reqs_reset() is called, the matching LocalInv
might never be posted. That leaves these MR registered /and/ on
req->rl_free_mrs, where they can be re-used for the next
connection.

Since xprtrdma does not keep specific track of the MR state, it's
not possible to know what state these MRs are in, so the only safe
thing to do is release them immediately.

Fixes: 5de55ce951a1 ("xprtrdma: Release in-flight MRs on disconnect")
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/verbs.c