summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-07-22 23:21:21 +0000
committergVisor bot <gvisor-bot@google.com>2019-07-22 23:21:21 +0000
commit88d2090454461e5ef762de803fd96d6412faa254 (patch)
tree9ba80b5a6ba404cfc2d40782c36243c64ad7e971 /pkg/sentry/platform
parent19c15720f7c7b13efa97c2458df95a5ff3fea2dc (diff)
parentd706922d788a1bbc9f1c917af1a08ca86488aab0 (diff)
Merge d706922d (automated)
Diffstat (limited to 'pkg/sentry/platform')
-rw-r--r--pkg/sentry/platform/kvm/machine.go3
-rwxr-xr-xpkg/sentry/platform/ring0/defs_impl.go2
2 files changed, 4 insertions, 1 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.
diff --git a/pkg/sentry/platform/ring0/defs_impl.go b/pkg/sentry/platform/ring0/defs_impl.go
index a30a9dd4a..a36a17e37 100755
--- a/pkg/sentry/platform/ring0/defs_impl.go
+++ b/pkg/sentry/platform/ring0/defs_impl.go
@@ -2,13 +2,13 @@ package ring0
import (
"gvisor.dev/gvisor/pkg/cpuid"
- "io"
"reflect"
"syscall"
"fmt"
"gvisor.dev/gvisor/pkg/sentry/platform/ring0/pagetables"
"gvisor.dev/gvisor/pkg/sentry/usermem"
+ "io"
)
var (