summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/task_start.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-03-06 02:27:15 +0000
committergVisor bot <gvisor-bot@google.com>2020-03-06 02:27:15 +0000
commit28c6d64163ff7ecf89fb018de9cd41056097145c (patch)
tree9ab8b59d2bf12fddf1c68fd1a44410f9dc5adbc9 /pkg/sentry/kernel/task_start.go
parent4a2fa62284db8ac3846f9e176f5a54fb50aa4be6 (diff)
parentda48fc6cca23a38faef51c5b5f8ae609940773a0 (diff)
Merge release-20200219.0-111-gda48fc6 (automated)
Diffstat (limited to 'pkg/sentry/kernel/task_start.go')
-rw-r--r--pkg/sentry/kernel/task_start.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/task_start.go b/pkg/sentry/kernel/task_start.go
index a5035bb7f..2bbf48bb8 100644
--- a/pkg/sentry/kernel/task_start.go
+++ b/pkg/sentry/kernel/task_start.go
@@ -93,6 +93,9 @@ type TaskConfig struct {
// ContainerID is the container the new task belongs to.
ContainerID string
+
+ // oomScoreAdj is the task's OOM score adjustment.
+ OOMScoreAdj int32
}
// NewTask creates a new task defined by cfg.
@@ -143,6 +146,7 @@ func (ts *TaskSet) newTask(cfg *TaskConfig) (*Task, error) {
rseqSignature: cfg.RSeqSignature,
futexWaiter: futex.NewWaiter(),
containerID: cfg.ContainerID,
+ oomScoreAdj: cfg.OOMScoreAdj,
}
t.creds.Store(cfg.Credentials)
t.endStopCond.L = &t.tg.signalHandlers.mu