diff options
author | Ghanan Gowripalan <ghanan@google.com> | 2020-10-20 16:04:45 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-20 16:06:30 -0700 |
commit | 2bfdbfd1fdbe09615b51d3cf360e751bd2c6a981 (patch) | |
tree | 97801e454a60de5d97b39357b58b5506f822a87b /pkg/tcpip | |
parent | 4da10f873e22a43be648ab34c9b9b2759d33337d (diff) |
Fix locking in AddressableEndpointState
PiperOrigin-RevId: 338156438
Diffstat (limited to 'pkg/tcpip')
-rw-r--r-- | pkg/tcpip/stack/addressable_endpoint_state.go | 2 |
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) } |