From b31ac4e1dfc0eef688e2d8e85df965292690726e Mon Sep 17 00:00:00 2001 From: Adin Scannell Date: Fri, 15 Jun 2018 09:29:19 -0700 Subject: Use notify explicitly on unlock path. There are circumstances under which the redpill call will not generate the appropriate action and notification. Replace this call with an explicit notification, which is guaranteed to transition as well as perform the futex wake. PiperOrigin-RevId: 200726934 Change-Id: Ie19e008a6007692dd7335a31a8b59f0af6e54aaa --- pkg/sentry/platform/kvm/machine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sentry/platform/kvm/machine.go b/pkg/sentry/platform/kvm/machine.go index ab2ccc695..f045345d5 100644 --- a/pkg/sentry/platform/kvm/machine.go +++ b/pkg/sentry/platform/kvm/machine.go @@ -397,7 +397,7 @@ func (c *vCPU) unlock() { case vCPUUser | vCPUGuest | vCPUWaiter: // Force a transition: this must trigger a notification when we // return from guest mode. - redpill() + c.notify() case vCPUUser | vCPUWaiter: // Waiting for the lock to be released; the responsibility is // on us to notify the waiter and clear the associated bit. -- cgit v1.2.3