summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip
diff options
context:
space:
mode:
authorGhanan Gowripalan <ghanan@google.com>2020-10-20 16:04:45 -0700
committergVisor bot <gvisor-bot@google.com>2020-10-20 16:06:30 -0700
commit2bfdbfd1fdbe09615b51d3cf360e751bd2c6a981 (patch)
tree97801e454a60de5d97b39357b58b5506f822a87b /pkg/tcpip
parent4da10f873e22a43be648ab34c9b9b2759d33337d (diff)
Fix locking in AddressableEndpointState
PiperOrigin-RevId: 338156438
Diffstat (limited to 'pkg/tcpip')
-rw-r--r--pkg/tcpip/stack/addressable_endpoint_state.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/tcpip/stack/addressable_endpoint_state.go b/pkg/tcpip/stack/addressable_endpoint_state.go
index 4d3acab96..261705575 100644
--- a/pkg/tcpip/stack/addressable_endpoint_state.go
+++ b/pkg/tcpip/stack/addressable_endpoint_state.go
@@ -361,6 +361,8 @@ func (a *AddressableEndpointState) RemovePermanentEndpoint(ep AddressEndpoint) *
return tcpip.ErrInvalidEndpointState
}
+ a.mu.Lock()
+ defer a.mu.Unlock()
return a.removePermanentEndpointLocked(addrState)
}