diff options
author | Alexander Aring <aahringo@redhat.com> | 2022-10-27 16:45:11 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-12 11:58:51 +0100 |
commit | 5b4478615f701c71ce9a521283a7858fa326116d (patch) | |
tree | 17dc94d0e87f6ce4bc5914f6a6158e19c81ec69c /fs | |
parent | b7ede8a63dd9a48f2caf4df93564f11fb632c217 (diff) | |
download | linux-stable-5b4478615f701c71ce9a521283a7858fa326116d.tar.gz linux-stable-5b4478615f701c71ce9a521283a7858fa326116d.tar.bz2 linux-stable-5b4478615f701c71ce9a521283a7858fa326116d.zip |
fs: dlm: fix sock release if listen fails
commit 08ae0547e75ec3d062b6b6b9cf4830c730df68df upstream.
This patch fixes a double sock_release() call when the listen() is
called for the dlm lowcomms listen socket. The caller of
dlm_listen_for_all should never care about releasing the socket if
dlm_listen_for_all() fails, it's done now only once if listen() fails.
Cc: stable@vger.kernel.org
Fixes: 2dc6b1158c28 ("fs: dlm: introduce generic listen")
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dlm/lowcomms.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 9d7078a1dc8b..55e451045149 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -1797,7 +1797,7 @@ static int dlm_listen_for_all(void) result = sock->ops->listen(sock, 5); if (result < 0) { dlm_close_sock(&listen_con.sock); - goto out; + return result; } return 0; @@ -2000,7 +2000,6 @@ fail_listen: dlm_proto_ops = NULL; fail_proto_ops: dlm_allow_conn = 0; - dlm_close_sock(&listen_con.sock); work_stop(); fail_local: deinit_local(); |