diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-03-06 02:27:15 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-03-06 02:27:15 +0000 |
commit | 28c6d64163ff7ecf89fb018de9cd41056097145c (patch) | |
tree | 9ab8b59d2bf12fddf1c68fd1a44410f9dc5adbc9 /pkg/sentry/kernel/task_clone.go | |
parent | 4a2fa62284db8ac3846f9e176f5a54fb50aa4be6 (diff) | |
parent | da48fc6cca23a38faef51c5b5f8ae609940773a0 (diff) |
Merge release-20200219.0-111-gda48fc6 (automated)
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 78866f280..dda502bb8 100644 --- a/pkg/sentry/kernel/task_clone.go +++ b/pkg/sentry/kernel/task_clone.go @@ -264,6 +264,11 @@ func (t *Task) Clone(opts *CloneOptions) (ThreadID, *SyscallControl, error) { rseqSignature = t.rseqSignature } + adj, err := t.OOMScoreAdj() + if err != nil { + return 0, nil, err + } + cfg := &TaskConfig{ Kernel: t.k, ThreadGroup: tg, @@ -282,6 +287,7 @@ func (t *Task) Clone(opts *CloneOptions) (ThreadID, *SyscallControl, error) { RSeqAddr: rseqAddr, RSeqSignature: rseqSignature, ContainerID: t.ContainerID(), + OOMScoreAdj: adj, } if opts.NewThreadGroup { cfg.Parent = t |