From 2bfdbfd1fdbe09615b51d3cf360e751bd2c6a981 Mon Sep 17 00:00:00 2001 From: Ghanan Gowripalan Date: Tue, 20 Oct 2020 16:04:45 -0700 Subject: Fix locking in AddressableEndpointState PiperOrigin-RevId: 338156438 --- pkg/tcpip/stack/addressable_endpoint_state.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg') 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) } -- cgit v1.2.3