diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-10-21 16:05:53 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-10-21 16:05:53 -0700 |
commit | 14f4113924c8b7b8c161be7335b147106d0c4a26 (patch) | |
tree | 55997b73a8b0f8959077b12bfff9418187e8e2ac /pkg/sentry/kernel/task_clone.go | |
parent | b928a241efc838d378d531ba2446e8611d95c1ac (diff) | |
parent | f03dc73f0f46d0ff1ae209fefc98ee3d7fc725d2 (diff) |
Merge pull request #6345 from sudo-sturbia:mq/syscalls
PiperOrigin-RevId: 404901660
Diffstat (limited to 'pkg/sentry/kernel/task_clone.go')
-rw-r--r-- | pkg/sentry/kernel/task_clone.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/task_clone.go b/pkg/sentry/kernel/task_clone.go index a6d8fb163..69a3227f0 100644 --- a/pkg/sentry/kernel/task_clone.go +++ b/pkg/sentry/kernel/task_clone.go @@ -103,6 +103,9 @@ func (t *Task) Clone(args *linux.CloneArgs) (ThreadID, *SyscallControl, error) { ipcns := t.IPCNamespace() if args.Flags&linux.CLONE_NEWIPC != 0 { ipcns = NewIPCNamespace(userns) + if VFS2Enabled { + ipcns.InitPosixQueues(t, t.k.VFS(), creds) + } } else { ipcns.IncRef() } @@ -464,6 +467,9 @@ func (t *Task) Unshare(flags int32) error { // namespace" t.ipcns.DecRef(t) t.ipcns = NewIPCNamespace(creds.UserNamespace) + if VFS2Enabled { + t.ipcns.InitPosixQueues(t, t.k.VFS(), creds) + } } var oldFDTable *FDTable if flags&linux.CLONE_FILES != 0 { |