android_kernel_motorola_sm6375/net/sunrpc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meena Shanmugam 2f8f6c393b SUNRPC: Ensure we flush any closed sockets before xs_xprt_free()
From: Trond Myklebust <trond.myklebust@hammerspace.com>

commit f00432063db1a0db484e85193eccc6845435b80e 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: 3be232f11a3c: SUNRPC: Prevent immediate close+reconnect
Cc: stable@vger.kernel.org # 5.1.x: 89f42494f92f: 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>
[meenashanmugam: Fix merge conflict in xprt_connect]
Signed-off-by: Meena Shanmugam <meenashanmugam@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-25 09:14:34 +02:00
..
auth_gss rpc: fix gss_svc_init cleanup on failure 2021-09-22 12:26:33 +02:00
xprtrdma SUNRPC/call_alloc: async tasks mustn't block waiting for memory 2022-04-15 14:18:35 +02:00
addr.c
auth.c
auth_null.c
auth_unix.c
backchannel_rqst.c
cache.c
clnt.c SUNRPC: Handle low memory situations in call_status() 2022-04-15 14:18:38 +02:00
debugfs.c
Kconfig
Makefile
netns.h
rpc_pipe.c fsnotify: fix fsnotify hooks in pseudo filesystems 2022-02-01 17:24:34 +01:00
rpcb_clnt.c
sched.c SUNRPC/call_alloc: async tasks mustn't block waiting for memory 2022-04-15 14:18:35 +02:00
socklib.c
stats.c
sunrpc.h
sunrpc_syms.c
svc.c sunrpc: fix refcount leak for rpc auth modules 2021-03-24 11:26:39 +01:00
svc_xprt.c
svcauth.c
svcauth_unix.c
svcsock.c
sysctl.c
timer.c
xdr.c
xprt.c SUNRPC: Ensure we flush any closed sockets before xs_xprt_free() 2022-05-25 09:14:34 +02:00
xprtmultipath.c
xprtsock.c SUNRPC: Ensure we flush any closed sockets before xs_xprt_free() 2022-05-25 09:14:34 +02:00