summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport
diff options
context:
space:
mode:
authorDean Deng <deandeng@google.com>2020-11-03 10:01:13 -0800
committergVisor bot <gvisor-bot@google.com>2020-11-03 10:03:30 -0800
commit66d24bb69228ef264de51c8306785780874ebdc3 (patch)
tree8eb16935e35dd90874b45d5df7dd0b33dd771910 /pkg/tcpip/transport
parent0e96f8065e7dc24aa5bc0a8cb14380c58ed6af13 (diff)
Release mutex before blocking during TCP handshake route resolution.
Without releasing the mutex, operations on the endpoint following a nonblocking connect will not make progress until connect is complete. PiperOrigin-RevId: 340467654
Diffstat (limited to 'pkg/tcpip/transport')
-rw-r--r--pkg/tcpip/transport/tcp/connect.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/tcpip/transport/tcp/connect.go b/pkg/tcpip/transport/tcp/connect.go
index fe4bc56f5..f5f7be195 100644
--- a/pkg/tcpip/transport/tcp/connect.go
+++ b/pkg/tcpip/transport/tcp/connect.go
@@ -496,7 +496,9 @@ func (h *handshake) resolveRoute() *tcpip.Error {
}
// Wait for notification.
+ h.ep.mu.Unlock()
index, _ = s.Fetch(true /* block */)
+ h.ep.mu.Lock()
}
}