From cea1dd7d21b976ad5cb145b94be7b1bf879235be Mon Sep 17 00:00:00 2001 From: Rahat Mahmood Date: Mon, 18 Mar 2019 10:47:59 -0700 Subject: Remove racy access to shm fields. PiperOrigin-RevId: 239016776 Change-Id: Ia7af4258e7c69b16a4630a6f3278aa8e6b627746 --- pkg/sentry/kernel/shm/shm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/sentry') 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) -- cgit v1.2.3