Skip to content

Commit

Permalink
Fixing runc panic during hugetlb pages
Browse files Browse the repository at this point in the history
Signed-off-by: rajasec <[email protected]>

Fixing runc panic during hugetlb pages

Signed-off-by: rajasec <[email protected]>
  • Loading branch information
rajasec committed Oct 15, 2016
1 parent 7be6eda commit 4b263c9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libcontainer/specconv/spec_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4b263c9

Please sign in to comment.