Skip to content

Commit

Permalink
Merge pull request #1116 from rajasec/hugetlb-panic
Browse files Browse the repository at this point in the history
Fixing runc panic during hugetlb pages
  • Loading branch information
hqhq committed Oct 17, 2016
2 parents 7be6eda + 4b263c9 commit a6284a7
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 a6284a7

Please sign in to comment.