Merge remote branch 'linus/master'
[powerpc.git] / mm / vmalloc.c
index 4efc41a..950c0be 100644 (file)
@@ -254,6 +254,10 @@ static struct vm_struct *__get_vm_area_node(unsigned long size, unsigned long fl
                if (addr > end - size)
                        goto out;
        }
+       if ((size + addr) < addr)
+               goto out;
+       if (addr > end - size)
+               goto out;
 
 found:
        area->next = *p;
@@ -816,7 +820,7 @@ void  __attribute__((weak)) vmalloc_sync_all(void)
 }
 
 
-static int f(pte_t *pte, struct page *pmd_page, unsigned long addr, void *data)
+static int f(pte_t *pte, pgtable_t table, unsigned long addr, void *data)
 {
        /* apply_to_page_range() does all the hard work. */
        return 0;