diff options
Diffstat (limited to 'pkg/sentry/platform')
-rw-r--r-- | pkg/sentry/platform/kvm/address_space.go | 3 | ||||
-rw-r--r-- | pkg/sentry/platform/platform.go | 2 | ||||
-rw-r--r-- | pkg/sentry/platform/ptrace/subprocess.go | 3 |
3 files changed, 3 insertions, 5 deletions
diff --git a/pkg/sentry/platform/kvm/address_space.go b/pkg/sentry/platform/kvm/address_space.go index a4b9198cc..173885867 100644 --- a/pkg/sentry/platform/kvm/address_space.go +++ b/pkg/sentry/platform/kvm/address_space.go @@ -200,8 +200,7 @@ func (as *addressSpace) Unmap(addr usermem.Addr, length uint64) { } // Release releases the page tables. -func (as *addressSpace) Release() error { +func (as *addressSpace) Release() { as.Unmap(0, ^uint64(0)) as.pageTables.Release() - return nil } diff --git a/pkg/sentry/platform/platform.go b/pkg/sentry/platform/platform.go index 6219dada7..1c385bc5a 100644 --- a/pkg/sentry/platform/platform.go +++ b/pkg/sentry/platform/platform.go @@ -205,7 +205,7 @@ type AddressSpace interface { // Release releases this address space. After releasing, a new AddressSpace // must be acquired via platform.NewAddressSpace(). - Release() error + Release() // AddressSpaceIO methods are supported iff the associated platform's // Platform.SupportsAddressSpaceIO() == true. AddressSpaces for which this diff --git a/pkg/sentry/platform/ptrace/subprocess.go b/pkg/sentry/platform/ptrace/subprocess.go index 0d6a38f15..035ebc332 100644 --- a/pkg/sentry/platform/ptrace/subprocess.go +++ b/pkg/sentry/platform/ptrace/subprocess.go @@ -242,14 +242,13 @@ func (s *subprocess) unmap() { // Therefore we simply unmap everything in the subprocess and return it to the // globalPool. This has the added benefit of reducing creation time for new // subprocesses. -func (s *subprocess) Release() error { +func (s *subprocess) Release() { go func() { // S/R-SAFE: Platform. s.unmap() globalPool.mu.Lock() globalPool.available = append(globalPool.available, s) globalPool.mu.Unlock() }() - return nil } // newThread creates a new traced thread. |