diff options
author | Rahat Mahmood <rahat@google.com> | 2019-03-18 10:47:59 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-03-18 10:49:03 -0700 |
commit | cea1dd7d21b976ad5cb145b94be7b1bf879235be (patch) | |
tree | 95ca8a30adb72730fcc5c27dc6baa3e94699f1b9 | |
parent | 6bece16b880e6afd3a1347205c45ae6f9272a5f5 (diff) |
Remove racy access to shm fields.
PiperOrigin-RevId: 239016776
Change-Id: Ia7af4258e7c69b16a4630a6f3278aa8e6b627746
-rw-r--r-- | pkg/sentry/kernel/shm/shm.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/kernel/shm/shm.go b/pkg/sentry/kernel/shm/shm.go index 4525aabf4..a7f0758ec 100644 --- a/pkg/sentry/kernel/shm/shm.go +++ b/pkg/sentry/kernel/shm/shm.go @@ -286,7 +286,7 @@ func (r *Registry) remove(s *Shm) { defer s.mu.Unlock() if s.key != linux.IPC_PRIVATE { - panic(fmt.Sprintf("Attempted to remove shm segment %+v from the registry whose key is still associated", s)) + panic(fmt.Sprintf("Attempted to remove shm segment %d (key=%d) from the registry whose key is still associated", s.ID, s.key)) } delete(r.shms, s.ID) |