Skip to content

Commit

Permalink
merge branch 'pr-2446'
Browse files Browse the repository at this point in the history
Kir Kolyshkin (1):
  (*initProcess).start: rm second Apply

LGTMs: @mrunalp @cyphar
Closes #2446
  • Loading branch information
cyphar committed Jun 4, 2020
2 parents 0853956 + d1ba8e3 commit 2a04669
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions libcontainer/process_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,16 +346,7 @@ func (p *initProcess) start() (retErr error) {
return newSystemErrorWithCausef(err, "getting pipe fds for pid %d", childPid)
}
p.setExternalDescriptors(fds)
// Do this before syncing with child so that no children
// can escape the cgroup
if err := p.manager.Apply(childPid); err != nil {
return newSystemErrorWithCause(err, "applying cgroup configuration for process")
}
if p.intelRdtManager != nil {
if err := p.intelRdtManager.Apply(childPid); err != nil {
return newSystemErrorWithCause(err, "applying Intel RDT configuration for process")
}
}

// Now it's time to setup cgroup namesapce
if p.config.Config.Namespaces.Contains(configs.NEWCGROUP) && p.config.Config.Namespaces.PathOf(configs.NEWCGROUP) == "" {
if _, err := p.messageSockPair.parent.Write([]byte{createCgroupns}); err != nil {
Expand Down

0 comments on commit 2a04669

Please sign in to comment.