linux/net/sunrpc/xprtrdma
Chuck Lever 83e025da9f xprtrdma: Fix rpcrdma_reqs_reset()
[ Upstream commit acd9f2dd23 ]

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: 5de55ce951 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-03 08:53:54 +02:00
..
backchannel.c xprtrdma: Clean up synopsis of rpcrdma_req_create() 2022-10-05 15:47:16 -04:00
frwr_ops.c xprtrdma: Fix rpcrdma_reqs_reset() 2024-08-03 08:53:54 +02:00
Makefile svcrdma: Add a "parsed chunk list" data structure 2020-11-30 13:00:22 -05:00
module.c SUNRPC: xprt_load_transport() needs to support the netid "rdma6" 2020-12-02 14:05:52 -05:00
rpc_rdma.c xprtrdma: treat all calls not a bcall when bc_serv is NULL 2022-05-31 17:09:30 -04:00
svc_rdma_backchannel.c svcrdma: Revert 2a1e4f21d8 ("svcrdma: Normalize Send page handling") 2023-06-12 12:16:36 -04:00
svc_rdma_pcl.c svcrdma: Add a "parsed chunk list" data structure 2020-11-30 13:00:22 -05:00
svc_rdma_recvfrom.c svcrdma: Drop connection after an RDMA Read error 2023-11-28 17:20:02 +00:00
svc_rdma_rw.c svcrdma: Remove an unused argument from __svc_rdma_put_rw_ctxt() 2023-06-17 13:18:07 -04:00
svc_rdma_sendto.c svcrdma: Convert "might sleep" comment into a code annotation 2023-06-17 13:18:06 -04:00
svc_rdma_transport.c svcrdma: Allocate new transports on device's NUMA node 2023-06-12 12:16:34 -04:00
svc_rdma.c sunrpc: simplify two-level sysctl registration for svcrdma_parm_table 2023-04-26 09:05:01 -04:00
transport.c sunrpc: simplify one-level sysctl registration for xr_tunables_table 2023-04-11 12:44:49 -04:00
verbs.c xprtrdma: Fix rpcrdma_reqs_reset() 2024-08-03 08:53:54 +02:00
xprt_rdma.h xprtrdma: Remove unused function declaration rpcrdma_bc_post_recv() 2023-08-23 15:58:47 -04:00