summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/task.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-10-14 07:18:14 +0000
committergVisor bot <gvisor-bot@google.com>2020-10-14 07:18:14 +0000
commit3329a497f21ee98ab85f000908ed6bb99e189ffc (patch)
treecae0a24bc73971f985d596c36ea6f2dce5456d09 /pkg/sentry/kernel/task.go
parent6a09acd73a2a4cedc3273e9446fc2d8737d45d0d (diff)
parenta7b7b7b9804e9968c1fed5f7b3849233f585a88b (diff)
Merge release-20200928.0-115-ga7b7b7b98 (automated)
Diffstat (limited to 'pkg/sentry/kernel/task.go')
-rw-r--r--pkg/sentry/kernel/task.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/sentry/kernel/task.go b/pkg/sentry/kernel/task.go
index e90a19cfb..037971393 100644
--- a/pkg/sentry/kernel/task.go
+++ b/pkg/sentry/kernel/task.go
@@ -656,7 +656,9 @@ func (t *Task) Value(key interface{}) interface{} {
case CtxUTSNamespace:
return t.utsns
case CtxIPCNamespace:
- return t.ipcns
+ ipcns := t.IPCNamespace()
+ ipcns.IncRef()
+ return ipcns
case CtxTask:
return t
case auth.CtxCredentials: