fs: dlm: fix sock release if listen fails
authorAlexander Aring <aahringo@redhat.com>
Thu, 27 Oct 2022 20:45:11 +0000 (16:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 10:58:51 +0000 (11:58 +0100)
commit5b4478615f701c71ce9a521283a7858fa326116d
tree17dc94d0e87f6ce4bc5914f6a6158e19c81ec69c
parentb7ede8a63dd9a48f2caf4df93564f11fb632c217
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>
fs/dlm/lowcomms.c