From: Yang Yingliang Date: Sat, 27 Mar 2021 08:37:04 +0000 (+0800) Subject: fs: dlm: fix missing unlock on error in accept_from_sock() X-Git-Tag: v5.13-rc1~80^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2fd8db2dd05d895961c7c7b9fa02d72f385560e4;p=thirdparty%2Flinux.git 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 Signed-off-by: Yang Yingliang Signed-off-by: David Teigland --- diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 73cc1809050a5..166e36fcf3e4c 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; }