* [PATCH -next] fs: dlm: fix missing unlock on error in accept_from_sock()
@ 2021-03-27 8:37 Yang Yingliang
2021-03-29 18:30 ` David Teigland
0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2021-03-27 8:37 UTC (permalink / raw)
To: linux-kernel, cluster-devel; +Cc: teigland, ccaulfie
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>
---
fs/dlm/lowcomms.c | 1 +
1 file changed, 1 insertion(+)
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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] fs: dlm: fix missing unlock on error in accept_from_sock()
2021-03-27 8:37 [PATCH -next] fs: dlm: fix missing unlock on error in accept_from_sock() Yang Yingliang
@ 2021-03-29 18:30 ` David Teigland
0 siblings, 0 replies; 2+ messages in thread
From: David Teigland @ 2021-03-29 18:30 UTC (permalink / raw)
To: Yang Yingliang; +Cc: linux-kernel, cluster-devel
On Sat, Mar 27, 2021 at 04:37:04PM +0800, Yang Yingliang wrote:
> Add the missing unlock before return from accept_from_sock()
> in the error handling case.
Thanks, applied to the next branch.
Dave
> Fixes: 6cde210a9758 ("fs: dlm: add helper for init connection")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> fs/dlm/lowcomms.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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;
> }
>
> --
> 2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-29 18:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-27 8:37 [PATCH -next] fs: dlm: fix missing unlock on error in accept_from_sock() Yang Yingliang
2021-03-29 18:30 ` David Teigland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).