diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 4efc41a6e2abefae709cfe0f8d59bcd0844c8dfa..0536dde139d1e1f6f28fc93ccd05a9fc337e2c7e 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -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;