Skip to content

Commit

Permalink
Merge pull request moby#48730 from kolyshkin/own-cgroup-path
Browse files Browse the repository at this point in the history
daemon: use OwnCgroupPath in withCgroups
  • Loading branch information
thaJeztah authored Oct 23, 2024
2 parents 7f8ef5c + 6be2074 commit 34898da
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions daemon/oci_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -829,15 +829,11 @@ func withCgroups(daemon *Daemon, daemonCfg *dconfig.Config, c *container.Contain

p := cgroupsPath
if useSystemd {
initPath, err := cgroups.GetInitCgroup("cpu")
path, err := cgroups.GetOwnCgroup("cpu")
if err != nil {
return errors.Wrap(err, "unable to init CPU RT controller")
}
_, err = cgroups.GetOwnCgroup("cpu")
if err != nil {
return errors.Wrap(err, "unable to init CPU RT controller")
}
p = filepath.Join(initPath, s.Linux.CgroupsPath)
p = filepath.Join(path, s.Linux.CgroupsPath)
}

// Clean path to guard against things like ../../../BAD
Expand Down

0 comments on commit 34898da

Please sign in to comment.