linux-stable/net/sunrpc
Dan Aloni cdc0234964 rpcrdma: fix handling for RDMA_CM_EVENT_DEVICE_REMOVAL
[ Upstream commit 4836da2197 ]

Under the scenario of IB device bonding, when bringing down one of the
ports, or all ports, we saw xprtrdma entering a non-recoverable state
where it is not even possible to complete the disconnect and shut it
down the mount, requiring a reboot. Following debug, we saw that
transport connect never ended after receiving the
RDMA_CM_EVENT_DEVICE_REMOVAL callback.

The DEVICE_REMOVAL callback is irrespective of whether the CM_ID is
connected, and ESTABLISHED may not have happened. So need to work with
each of these states accordingly.

Fixes: 2acc5cae29 ('xprtrdma: Prevent dereferencing r_xprt->rx_ep after it is freed')
Cc: Sagi Grimberg <sagi.grimberg@vastdata.com>
Signed-off-by: Dan Aloni <dan.aloni@vastdata.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-12 11:03:51 +02:00
..
auth_gss SUNRPC: Fix gss_free_in_token_pages() 2024-06-12 11:03:31 +02:00
xprtrdma rpcrdma: fix handling for RDMA_CM_EVENT_DEVICE_REMOVAL 2024-06-12 11:03:51 +02:00
Kconfig
Makefile
addr.c net: sunrpc: Fix an off by one in rpc_sockaddr2uaddr() 2024-03-26 18:20:55 -04:00
auth.c NFS client updates for Linux 5.20 2022-08-10 14:04:32 -07:00
auth_null.c
auth_unix.c SUNRPC: Fix unx_lookup_cred() allocation 2022-03-22 15:52:55 -04:00
backchannel_rqst.c NFS client updates for Linux 5.20 2022-08-10 14:04:32 -07:00
cache.c treewide: use prandom_u32_max() when possible, part 1 2022-10-11 17:42:55 -06:00
clnt.c sunrpc: fix NFSACL RPC retry on soft mount 2024-06-12 11:03:51 +02:00
debugfs.c SUNRPC: Cache deferral injection 2022-05-19 12:25:38 -04:00
fail.h SUNRPC: Cache deferral injection 2022-05-19 12:25:38 -04:00
netns.h
rpc_pipe.c fs: allocate inode by using alloc_inode_sb() 2022-03-22 15:57:03 -07:00
rpcb_clnt.c SUNRPC: Add an IS_ERR() check back to where it was 2023-11-28 17:07:03 +00:00
sched.c SUNRPC: Don't change task->tk_status after the call to rpc_exit_task 2023-05-30 14:03:17 +01:00
socklib.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
socklib.h
stats.c
sunrpc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_149.RULE 2022-06-10 14:51:35 +02:00
sunrpc_syms.c
svc.c sunrpc: removed redundant procp check 2024-06-12 11:03:30 +02:00
svc_xprt.c nfsd: don't allow nfsd threads to be signalled. 2024-05-25 16:21:30 +02:00
svcauth.c SUNRPC: Teach server to recognize RPC_AUTH_TLS 2022-02-28 10:26:40 -05:00
svcauth_unix.c sunrpc: only free unix grouplist after RCU settles 2023-04-13 16:55:23 +02:00
svcsock.c SUNRPC: Fix UAF in svc_tcp_listen_data_ready() 2023-07-19 16:21:48 +02:00
sysctl.c
sysfs.c SUNRPC: Fix null-ptr-deref when xps sysfs alloc failed 2022-10-27 15:52:10 -04:00
sysfs.h
timer.c
xdr.c SUNRPC: Fix typo in xdr_buf_subsegment's kdoc comment 2022-09-26 14:02:47 -04:00
xprt.c timers: Get rid of del_singleshot_timer_sync() 2024-05-17 11:56:12 +02:00
xprtmultipath.c SUNRPC: Fix a suspicious RCU usage warning 2024-02-05 20:12:49 +00:00
xprtsock.c SUNRPC: fix shutdown of NFS TCP client socket 2023-04-06 12:10:44 +02:00