summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/vmalloc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 4efc41a..0536dde 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;
OpenPOWER on IntegriCloud