Fixing runc panic during hugetlb pages

Signed-off-by: rajasec <rajasec79@gmail.com>

Fixing runc panic during hugetlb pages

Signed-off-by: rajasec <rajasec79@gmail.com>
This commit is contained in:
rajasec 2016-10-14 19:51:40 +05:30
parent 7be6edaa60
commit 4b263c9594
1 changed files with 3 additions and 0 deletions

View File

@ -438,6 +438,9 @@ func createCgroupConfig(name string, useSystemdCgroup bool, spec *specs.Spec) (*
}
}
for _, l := range r.HugepageLimits {
if l.Pagesize == nil || l.Limit == nil {
return nil, fmt.Errorf("pagesize and limit can not be empty")
}
c.Resources.HugetlbLimit = append(c.Resources.HugetlbLimit, &configs.HugepageLimit{
Pagesize: *l.Pagesize,
Limit: *l.Limit,