summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-06-18 21:32:48 +0000
committergVisor bot <gvisor-bot@google.com>2020-06-18 21:32:48 +0000
commit659bf2a119d52d03f11d667a950e9d8772cb006c (patch)
treea0ce6e6c868b11224df85251d965e8e92b5e33fd /pkg/sentry
parentb4b912b9101ef337714499472732e37c10b87ee6 (diff)
parentf97122f44c5c4218bb2239686cd323358c661d60 (diff)
Merge release-20200608.0-85-gf97122f44 (automated)
Diffstat (limited to 'pkg/sentry')
-rw-r--r--pkg/sentry/device/device.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/device/device.go b/pkg/sentry/device/device.go
index 69e71e322..f45b2bd2b 100644
--- a/pkg/sentry/device/device.go
+++ b/pkg/sentry/device/device.go
@@ -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 {