Skip to content

Commit 4b263c9

Browse files
committed
Fixing runc panic during hugetlb pages
Signed-off-by: rajasec <[email protected]> Fixing runc panic during hugetlb pages Signed-off-by: rajasec <[email protected]>
1 parent 7be6eda commit 4b263c9

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)