mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Acquire lock when accessing MultiDevice's cache in String().
PiperOrigin-RevId: 317180925
This commit is contained in:
@@ -188,6 +188,9 @@ type MultiDevice struct {
|
||||
|
||||
// String stringifies MultiDevice.
|
||||
func (m *MultiDevice) String() string {
|
||||
m.mu.Lock()
|
||||
defer m.mu.Unlock()
|
||||
|
||||
buf := bytes.NewBuffer(nil)
|
||||
buf.WriteString("cache{")
|
||||
for k, v := range m.cache {
|
||||
|
||||
Reference in New Issue
Block a user