diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2023-05-04 13:43:33 -0400 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2023-05-05 20:51:11 -0400 |
commit | 319050d4302ee9b216fb8cea847a9c4427628a98 (patch) | |
tree | 82f8248a7712f4aac4e9974061e40285b18a3b65 /scripts/Makefile.modpost | |
parent | 29cd2927fb914cc53b5ba4f67d2b74695c994ba4 (diff) | |
download | linux-stable-319050d4302ee9b216fb8cea847a9c4427628a98.tar.gz linux-stable-319050d4302ee9b216fb8cea847a9c4427628a98.tar.bz2 linux-stable-319050d4302ee9b216fb8cea847a9c4427628a98.zip |
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 'scripts/Makefile.modpost')
0 files changed, 0 insertions, 0 deletions