]> Git Repo - linux.git/commitdiff
fs: dlm: fix missing unlock on error in accept_from_sock()
authorYang Yingliang <[email protected]>
Sat, 27 Mar 2021 08:37:04 +0000 (16:37 +0800)
committerDavid Teigland <[email protected]>
Mon, 29 Mar 2021 18:28:18 +0000 (13:28 -0500)
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 <[email protected]>
Signed-off-by: Yang Yingliang <[email protected]>
Signed-off-by: David Teigland <[email protected]>
fs/dlm/lowcomms.c

index 73cc1809050a5f2b513d4f7dd4b369fe0e71a8ee..166e36fcf3e4c16867821dd11c6c6df2c9440bd9 100644 (file)
@@ -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;
                        }
 
This page took 0.06465 seconds and 4 git commands to generate.