mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Skip pids.max if value is zero
LinuxPids.Limit is the only optional cgroup field in OCI that is not a pointer. If value is 0 or negative it should be skipped. PiperOrigin-RevId: 315791909
This commit is contained in:
committed by
gVisor bot
parent
9338854ea3
commit
41d9e536d5
@@ -545,7 +545,7 @@ func (*networkPrio) set(spec *specs.LinuxResources, path string) error {
|
||||
type pids struct{}
|
||||
|
||||
func (*pids) set(spec *specs.LinuxResources, path string) error {
|
||||
if spec.Pids == nil {
|
||||
if spec.Pids == nil || spec.Pids.Limit <= 0 {
|
||||
return nil
|
||||
}
|
||||
val := strconv.FormatInt(spec.Pids.Limit, 10)
|
||||
|
||||
Reference in New Issue
Block a user