]> git.baikalelectronics.ru Git - kernel.git/commit
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>
Sat, 7 Jan 2023 10:11:44 +0000 (11:11 +0100)
commit2ef4cd2d0b7752743e5ba7da1e139277171148ee
treebf65c9e66f261df45b8b0dc0a51917a9c2e16900
parentd663f122caa44e5a701a19f63633d9292fb44937
fs: dlm: fix sock release if listen fails

commit a4d902f944c80c8b566265417b068e26f0dcfed8 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: 468076ed3b4e ("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