diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2013-10-23 12:15:08 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-10-23 12:15:08 -0400 |
commit | ab44280a7951ea04105c17152286582985028fcc (patch) | |
tree | 2266f4377120313147090c313d9f4948001e8c75 /mm | |
parent | 596dcbfbdfdce79dc2cbef88f678e8ae74ab7a01 (diff) | |
parent | 940d5466e08c41c44366d5ea4b36930d1dbd02c3 (diff) |
Merge tag 'v3.4.63' into v3.4-rt
This is the 3.4.63 stable release
Diffstat (limited to 'mm')
-rw-r--r-- | mm/huge_memory.c | 2 | ||||
-rw-r--r-- | mm/memcontrol.c | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index ef99c15fa36c..3da5c0bff3b0 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1894,6 +1894,8 @@ static void collapse_huge_page(struct mm_struct *mm, goto out; vma = find_vma(mm, address); + if (!vma) + goto out; hstart = (vma->vm_start + ~HPAGE_PMD_MASK) & HPAGE_PMD_MASK; hend = vma->vm_end & HPAGE_PMD_MASK; if (address < hstart || address + HPAGE_PMD_SIZE > hend) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 81c275b3afed..9c364428cf71 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -4349,7 +4349,13 @@ static int compare_thresholds(const void *a, const void *b) const struct mem_cgroup_threshold *_a = a; const struct mem_cgroup_threshold *_b = b; - return _a->threshold - _b->threshold; + if (_a->threshold > _b->threshold) + return 1; + + if (_a->threshold < _b->threshold) + return -1; + + return 0; } static int mem_cgroup_oom_notify_cb(struct mem_cgroup *memcg) |