Remove racy access to shm fields.

PiperOrigin-RevId: 239016776
Change-Id: Ia7af4258e7c69b16a4630a6f3278aa8e6b627746
This commit is contained in:
Rahat Mahmood
2019-03-18 10:49:03 -07:00
committed by Shentubot
parent 6bece16b88
commit cea1dd7d21
+1 -1
View File
@@ -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)