diff --git a/libcontainer/specconv/spec_linux.go b/libcontainer/specconv/spec_linux.go index 7e12ffd1..19a4cc43 100644 --- a/libcontainer/specconv/spec_linux.go +++ b/libcontainer/specconv/spec_linux.go @@ -373,7 +373,7 @@ func createCgroupConfig(name string, useSystemdCgroup bool, spec *specs.Spec) (* c.Resources.CpusetMems = *r.CPU.Mems } } - if r.Pids != nil { + if r.Pids != nil && r.Pids.Limit != nil { c.Resources.PidsLimit = *r.Pids.Limit } if r.BlockIO != nil {