[Devel] [PATCH rh7] ve, net: Fix unbalanced double spin_unlock() in tcp_v4_kill_ve_sockets()

Kirill Tkhai ktkhai at odin.com
Tue May 19 07:43:11 PDT 2015


Double loop is here, "break works is not as expected".

Signed-off-by: Kirill Tkhai <ktkhai at odin.com>
---
 net/ipv4/tcp_ipv4.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 532edea..0e990c2 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2880,7 +2880,7 @@ void tcp_v4_kill_ve_sockets(struct ve_struct *envid)
 					retry = 1;
 					bh_unlock_sock(sk);
 					sock_put(sk);
-					break;
+					goto enable_bh;
 				}
 				/* sk might have disappeared from the hash before
 				 * we got the lock */
@@ -2893,6 +2893,7 @@ void tcp_v4_kill_ve_sockets(struct ve_struct *envid)
 		}
 		spin_unlock(lock);
 	}
+enable_bh:
 	local_bh_enable();
 	if (retry) {
 		schedule_timeout_interruptible(HZ);




More information about the Devel mailing list