[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210512144841.759688949@linuxfoundation.org>
Date: Wed, 12 May 2021 16:48:20 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Hulk Robot <hulkci@...wei.com>,
Yang Yingliang <yangyingliang@...wei.com>,
David Teigland <teigland@...hat.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.11 423/601] fs: dlm: fix missing unlock on error in accept_from_sock()
From: Yang Yingliang <yangyingliang@...wei.com>
[ Upstream commit 2fd8db2dd05d895961c7c7b9fa02d72f385560e4 ]
Add the missing unlock before return from accept_from_sock()
in the error handling case.
Fixes: 6cde210a9758 ("fs: dlm: add helper for init connection")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
Signed-off-by: David Teigland <teigland@...hat.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
fs/dlm/lowcomms.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 372c34ff8594..f7d2c52791f8 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -908,6 +908,7 @@ static int accept_from_sock(struct listen_connection *con)
result = dlm_con_init(othercon, nodeid);
if (result < 0) {
kfree(othercon);
+ mutex_unlock(&newcon->sock_mutex);
goto accept_err;
}
--
2.30.2
Powered by blists - more mailing lists