diff options
author | Mark Brown <broonie@linaro.org> | 2013-09-27 10:43:52 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-27 10:43:52 +0100 |
commit | 2a0458773656240cf6fa97f1126c92dcddf8ab90 (patch) | |
tree | 3f2efbe9c5a467bc5bcacddd6dc450200092aefd /mm | |
parent | 4ed4d44eb2192604716226a6f0edad02ab76101f (diff) | |
parent | cff43fc8785eb4f8b3fa5a1030890fd8cad0cbdd (diff) |
Merge tag 'v3.10.13' into linux-linaro-lsk
This is the 3.10.13 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 362c329b83f..b92d0ce428b 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2286,6 +2286,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 82a187aea4c..905ce72c8c4 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5584,7 +5584,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) |