diff options
-rw-r--r-- | pkg/sentry/platform/kvm/machine.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/platform/kvm/machine.go b/pkg/sentry/platform/kvm/machine.go index 679087e25..cc6c138b2 100644 --- a/pkg/sentry/platform/kvm/machine.go +++ b/pkg/sentry/platform/kvm/machine.go @@ -388,7 +388,10 @@ func (m *machine) Get() *vCPU { func (m *machine) Put(c *vCPU) { c.unlock() runtime.UnlockOSThread() + + m.mu.RLock() m.available.Signal() + m.mu.RUnlock() } // newDirtySet returns a new dirty set. |