summaryrefslogtreecommitdiff
path: root/fs/dlm/lowcomms.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-03-27 11:37:04 +0300
committerDavid Teigland <teigland@redhat.com>2021-03-29 21:28:18 +0300
commit2fd8db2dd05d895961c7c7b9fa02d72f385560e4 (patch)
tree40cbbfaf8fd8cbb9303159abac4d3d74defb2923 /fs/dlm/lowcomms.c
parent9d232469bcd772dbedb9e75a165c681b920524ee (diff)
downloadlinux-2fd8db2dd05d895961c7c7b9fa02d72f385560e4.tar.xz
fs: dlm: fix missing unlock on error in accept_from_sock()
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@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/lowcomms.c')
-rw-r--r--fs/dlm/lowcomms.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 73cc1809050a..166e36fcf3e4 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -931,6 +931,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;
}