Skip to content

Commit a6284a7

Browse files
authored
Merge pull request opencontainers#1116 from rajasec/hugetlb-panic
Fixing runc panic during hugetlb pages
2 parents 7be6eda + 4b263c9 commit a6284a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libcontainer/specconv/spec_linux.go

+3
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,9 @@ func createCgroupConfig(name string, useSystemdCgroup bool, spec *specs.Spec) (*
438438
}
439439
}
440440
for _, l := range r.HugepageLimits {
441+
if l.Pagesize == nil || l.Limit == nil {
442+
return nil, fmt.Errorf("pagesize and limit can not be empty")
443+
}
441444
c.Resources.HugetlbLimit = append(c.Resources.HugetlbLimit, &configs.HugepageLimit{
442445
Pagesize: *l.Pagesize,
443446
Limit: *l.Limit,

0 commit comments

Comments
 (0)