summaryrefslogtreecommitdiff
path: root/net/sunrpc/svc_xprt.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-05-04 20:43:33 +0300
committerChuck Lever <chuck.lever@oracle.com>2023-05-06 03:51:11 +0300
commit319050d4302ee9b216fb8cea847a9c4427628a98 (patch)
tree82f8248a7712f4aac4e9974061e40285b18a3b65 /net/sunrpc/svc_xprt.c
parent29cd2927fb914cc53b5ba4f67d2b74695c994ba4 (diff)
downloadlinux-319050d4302ee9b216fb8cea847a9c4427628a98.tar.xz
SUNRPC: Fix error handling in svc_setup_socket()
Dan points out that sock_alloc_file() releases @sock on error, but so do all of svc_setup_socket's callers, resulting in a double- release if sock_alloc_file() returns an error. Rather than allocating a struct file for all new sockets, allocate one only for sockets created during a TCP accept. For the moment, those are the only ones that will ever be used with RPC-with-TLS. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Fixes: ae0d77708aae ("SUNRPC: Ensure server-side sockets have a sock->file") Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc/svc_xprt.c')
0 files changed, 0 insertions, 0 deletions