[Devel] [PATCH RHEL7 COMMIT] ve/net: Fix unbalanced double spin_unlock() in tcp_v4_kill_ve_sockets()

Konstantin Khorenko khorenko at odin.com
Tue May 19 09:31:10 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.3
------>
commit 614449e95ca14fb99fd9d1fbb33a0842f64fb394
Author: Kirill Tkhai <ktkhai at odin.com>
Date:   Tue May 19 20:31:10 2015 +0400

    ve/net: Fix unbalanced double spin_unlock() in tcp_v4_kill_ve_sockets()
    
    Double loop is here, "break works is not as expected".
    
    https://jira.sw.ru/browse/PSBM-33585
    
    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 @@ more_work:
 					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 @@ more_work:
 		}
 		spin_unlock(lock);
 	}
+enable_bh:
 	local_bh_enable();
 	if (retry) {
 		schedule_timeout_interruptible(HZ);



More information about the Devel mailing list