diff options
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r-- | mm/vmalloc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index a6fce97d15b7..5aeb2c44d9da 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -439,7 +439,11 @@ nocache: } found: - if (addr + size > vend) + /* + * Check also calculated address against the vstart, + * because it can be 0 because of big align request. + */ + if (addr + size > vend || addr < vstart) goto overflow; va->va_start = addr; |