mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-08-05 22:19:52 +00:00
- [CVE-2019-19921](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19921) See https://github.com/opencontainers/runc/releases/tag/v1.0.0-rc10
23 lines
556 B
Go
23 lines
556 B
Go
// +build linux
|
|
|
|
package fs2
|
|
|
|
import (
|
|
"github.com/opencontainers/runc/libcontainer/cgroups/fscommon"
|
|
"github.com/opencontainers/runc/libcontainer/configs"
|
|
)
|
|
|
|
func setCpuset(dirPath string, cgroup *configs.Cgroup) error {
|
|
if cgroup.Resources.CpusetCpus != "" {
|
|
if err := fscommon.WriteFile(dirPath, "cpuset.cpus", cgroup.Resources.CpusetCpus); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if cgroup.Resources.CpusetMems != "" {
|
|
if err := fscommon.WriteFile(dirPath, "cpuset.mems", cgroup.Resources.CpusetMems); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
return nil
|
|
}
|