diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/sentry/kernel/task.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/task.go b/pkg/sentry/kernel/task.go index 19029adb1..0f83c0a39 100644 --- a/pkg/sentry/kernel/task.go +++ b/pkg/sentry/kernel/task.go @@ -568,12 +568,18 @@ func (t *Task) Value(key interface{}) interface{} { case CtxPIDNamespace: return t.tg.pidns case CtxUTSNamespace: + t.mu.Lock() + defer t.mu.Unlock() return t.utsns case CtxIPCNamespace: + t.mu.Lock() + defer t.mu.Unlock() return t.ipcns case CtxTask: return t case auth.CtxCredentials: + t.mu.Lock() + defer t.mu.Unlock() return t.creds case context.CtxThreadGroupID: return int32(t.ThreadGroup().ID()) |