summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/ptrace
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/platform/ptrace')
-rw-r--r--pkg/sentry/platform/ptrace/ptrace.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/sentry/platform/ptrace/ptrace.go b/pkg/sentry/platform/ptrace/ptrace.go
index a44f549a2..4f20716f7 100644
--- a/pkg/sentry/platform/ptrace/ptrace.go
+++ b/pkg/sentry/platform/ptrace/ptrace.go
@@ -142,9 +142,12 @@ func (c *context) Switch(as platform.AddressSpace, ac arch.Context, cpu int32) (
if isSyscall {
return nil, usermem.NoAccess, nil
}
+
+ si := c.signalInfo
+
if faultSP == nil {
// Non-fault signal.
- return &c.signalInfo, usermem.NoAccess, platform.ErrContextSignal
+ return &si, usermem.NoAccess, platform.ErrContextSignal
}
// Got a page fault. Ideally, we'd get real fault type here, but ptrace
@@ -168,7 +171,7 @@ func (c *context) Switch(as platform.AddressSpace, ac arch.Context, cpu int32) (
// here, in case this fault was generated by a CPUID exception. There
// is no way to distinguish between CPUID-generated faults and regular
// page faults.
- return &c.signalInfo, at, platform.ErrContextSignalCPUID
+ return &si, at, platform.ErrContextSignalCPUID
}
// Interrupt interrupts the running guest application associated with this context.