Files
gvisor/pkg/sentry/platform
Andrei Vagin 14d6cb4436 platform/kvm: fix a race condition in vCPU.unlock()
Right now, it contains the code:

  origState := atomic.LoadUint32(&c.state)
  atomicbitops.AndUint32(&c.state, ^vCPUUser)

The problem here is that vCPU.bounce that is called from another thread can add
vCPUWaiter when origState has been read but vCPUUser isn't cleared yet. In this
case, vCPU.unlock doesn't notify other threads about changes and c.bounce will
be stuck in the futex_wait call.

PiperOrigin-RevId: 389697411
2021-08-09 12:32:31 -07:00
..
2021-03-29 13:30:21 -07:00
2020-01-27 15:31:32 -08:00