summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/context.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/kernel/context.go')
-rw-r--r--pkg/sentry/kernel/context.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/sentry/kernel/context.go b/pkg/sentry/kernel/context.go
index a8596410f..7e11c6580 100644
--- a/pkg/sentry/kernel/context.go
+++ b/pkg/sentry/kernel/context.go
@@ -16,6 +16,7 @@ package kernel
import (
"gvisor.dev/gvisor/pkg/context"
+ "gvisor.dev/gvisor/pkg/sentry/kernel/ipc"
)
// contextID is the kernel package's type for context.Context.Value keys.
@@ -37,9 +38,6 @@ const (
// CtxUTSNamespace is a Context.Value key for a UTSNamespace.
CtxUTSNamespace
-
- // CtxIPCNamespace is a Context.Value key for a IPCNamespace.
- CtxIPCNamespace
)
// ContextCanTrace returns true if ctx is permitted to trace t, in the same sense
@@ -82,7 +80,7 @@ func UTSNamespaceFromContext(ctx context.Context) *UTSNamespace {
// or nil if there is no such IPC namespace. It takes a reference on the
// namespace.
func IPCNamespaceFromContext(ctx context.Context) *IPCNamespace {
- if v := ctx.Value(CtxIPCNamespace); v != nil {
+ if v := ctx.Value(ipc.CtxIPCNamespace); v != nil {
return v.(*IPCNamespace)
}
return nil