[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <b5e8edff-dc07-f34e-9f01-4d9e984d469e@cn.fujitsu.com>
Date: Thu, 19 Apr 2018 09:08:57 +0800
From: sunlianwen <sunlw.fnst@...fujitsu.com>
To: <netdev@...r.kernel.org>
Subject: [PATCH] net: add mutex_unlock on xfrm4_protocol_register
The function of xfrm4_protocol_register() don't release
the mutx lock, which potential cause deadlock.
Signed-off-by: Lianwen Sun <sunlw.fnst@...fujitsu.com>
---
net/ipv4/xfrm4_protocol.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/ipv4/xfrm4_protocol.c b/net/ipv4/xfrm4_protocol.c
index 8dd0e6ab8606..1ee34edef9d2 100644
--- a/net/ipv4/xfrm4_protocol.c
+++ b/net/ipv4/xfrm4_protocol.c
@@ -240,6 +240,10 @@ int xfrm4_protocol_register(struct xfrm4_protocol *handler,
ret = 0;
+ mutex_unlock(&xfrm4_protocol_mutex);
+
+ return ret;
+
err:
mutex_unlock(&xfrm4_protocol_mutex);
--
2.17.0
.
Powered by blists - more mailing lists