linux-stable/net/sunrpc
Trond Myklebust d21287d8a4 SUNRPC: Ensure we flush any closed sockets before xs_xprt_free()
commit f00432063d upstream.

We must ensure that all sockets are closed before we call xprt_free()
and release the reference to the net namespace. The problem is that
calling fput() will defer closing the socket until delayed_fput() gets
called.
Let's fix the situation by allowing rpciod and the transport teardown
code (which runs on the system wq) to call __fput_sync(), and directly
close the socket.

Reported-by: Felix Fu <foyjog@gmail.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Fixes: a73881c96d ("SUNRPC: Fix an Oops in udp_poll()")
Cc: stable@vger.kernel.org # 5.1.x: 3be232f11a: SUNRPC: Prevent immediate close+reconnect
Cc: stable@vger.kernel.org # 5.1.x: 89f42494f9: SUNRPC: Don't call connect() more than once on a TCP socket
Cc: stable@vger.kernel.org # 5.1.x
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-13 19:27:40 +02:00
..
auth_gss NFS Client Updates for Linux 5.17 2022-01-25 20:16:03 +02:00
xprtrdma SUNRPC/xprt: async tasks mustn't block waiting for memory 2022-04-13 19:27:25 +02:00
addr.c nfsd: don't alloc under spinlock in rpc_parse_scope_id 2021-09-21 17:51:47 -04:00
auth.c
auth_null.c
auth_unix.c
backchannel_rqst.c
cache.c proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
clnt.c SUNRPC: Handle low memory situations in call_status() 2022-04-13 19:27:33 +02:00
debugfs.c NFS Client Updates for Linux 5.15 2021-09-04 10:25:26 -07:00
fail.h SUNRPC: Server-side disconnect injection 2021-08-20 13:50:33 -04:00
Kconfig
Makefile
netns.h
rpc_pipe.c fsnotify: fix fsnotify hooks in pseudo filesystems 2022-01-24 14:17:02 +01:00
rpcb_clnt.c
sched.c SUNRPC: remove scheduling boost for "SWAPPER" tasks. 2022-04-13 19:27:25 +02:00
socklib.c
socklib.h
stats.c proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
sunrpc.h
sunrpc_syms.c
svc.c lockd: use svc_set_num_threads() for thread start and stop 2021-12-13 13:42:58 -05:00
svc_xprt.c Highlights: 2022-01-16 07:42:58 +02:00
svcauth.c SUNRPC: Add svc_rqst::rq_auth_stat 2021-08-10 14:18:35 -04:00
svcauth_unix.c SUNRPC: Set rq_auth_stat in the pg_authenticate() callout 2021-08-10 14:18:35 -04:00
svcsock.c SUNRPC: svc_tcp_sendmsg() should handle errors from xdr_alloc_bvec() 2022-04-13 19:27:34 +02:00
sysctl.c
sysfs.c SUNRPC: Do not dereference non-socket transports in sysfs 2022-04-08 13:57:17 +02:00
sysfs.h
timer.c
xdr.c SUNRPC: xdr_stream_subsegment() must handle non-zero page_bases 2021-10-02 16:10:01 -04:00
xprt.c SUNRPC: Ensure we flush any closed sockets before xs_xprt_free() 2022-04-13 19:27:40 +02:00
xprtmultipath.c SUNRPC keep track of number of transports to unique addresses 2021-08-27 16:36:53 -04:00
xprtsock.c SUNRPC: Ensure we flush any closed sockets before xs_xprt_free() 2022-04-13 19:27:40 +02:00