aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorDaniel Hillenbrand <codeworkx@cyanogenmod.org>2013-06-04 01:33:22 +0200
committerDaniel Hillenbrand <codeworkx@cyanogenmod.org>2013-06-04 12:54:26 +0200
commit55bb2048feb59f2190f704c2a4df81b557b55c7a (patch)
treecbb680a60770fb762e5b27c502ad71c2366bf604 /mm
parent3d8b293a4f5042cd9fdc4009a40f6483371cd489 (diff)
downloadkernel_samsung_smdk4412-55bb2048feb59f2190f704c2a4df81b557b55c7a.zip
kernel_samsung_smdk4412-55bb2048feb59f2190f704c2a4df81b557b55c7a.tar.gz
kernel_samsung_smdk4412-55bb2048feb59f2190f704c2a4df81b557b55c7a.tar.bz2
smdk4412: bulk update from i9300 update 9
Change-Id: Icd3e7b601f3f4c8b3dcf053fed5819fb7caf5296
Diffstat (limited to 'mm')
-rw-r--r--mm/cma.c8
-rw-r--r--mm/page_alloc-cma.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/mm/cma.c b/mm/cma.c
index 9d07750..2e5805b 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -284,9 +284,15 @@ bool cma_is_registered_region(phys_addr_t start, size_t size)
{
struct cma_region *reg;
+ if (start + size <= start)
+ return false;
+
cma_foreach_region(reg) {
if ((start >= reg->start) &&
- ((start + size) <= (reg->start + reg->size)))
+ ((start + size) <= (reg->start + reg->size)) &&
+ (size <= reg->size) &&
+ (start < (reg->start + reg->size)))
+
return true;
}
return false;
diff --git a/mm/page_alloc-cma.c b/mm/page_alloc-cma.c
index 74cdf7d..fc675bd 100644
--- a/mm/page_alloc-cma.c
+++ b/mm/page_alloc-cma.c
@@ -6057,7 +6057,7 @@ static int __alloc_contig_migrate_range(unsigned long start, unsigned long end)
failed_pages[i][j] = NULL;
}
- migrate_prep_local();
+ migrate_prep();
while (pfn < end || !list_empty(&cc.migratepages)) {
if (fatal_signal_pending(current)) {