diff options
Diffstat (limited to 'mm/vmalloc.c')
| -rw-r--r-- | mm/vmalloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index ddf87145cc49..8e05a11155c9 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
| @@ -432,11 +432,12 @@ void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, | |||
| 432 | area->nr_pages = nr_pages; | 432 | area->nr_pages = nr_pages; |
| 433 | /* Please note that the recursion is strictly bounded. */ | 433 | /* Please note that the recursion is strictly bounded. */ |
| 434 | if (array_size > PAGE_SIZE) { | 434 | if (array_size > PAGE_SIZE) { |
| 435 | pages = __vmalloc_node(array_size, gfp_mask, PAGE_KERNEL, node); | 435 | pages = __vmalloc_node(array_size, gfp_mask | __GFP_ZERO, |
| 436 | PAGE_KERNEL, node); | ||
| 436 | area->flags |= VM_VPAGES; | 437 | area->flags |= VM_VPAGES; |
| 437 | } else { | 438 | } else { |
| 438 | pages = kmalloc_node(array_size, | 439 | pages = kmalloc_node(array_size, |
| 439 | (gfp_mask & GFP_LEVEL_MASK), | 440 | (gfp_mask & GFP_LEVEL_MASK) | __GFP_ZERO, |
| 440 | node); | 441 | node); |
| 441 | } | 442 | } |
| 442 | area->pages = pages; | 443 | area->pages = pages; |
| @@ -445,7 +446,6 @@ void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, | |||
| 445 | kfree(area); | 446 | kfree(area); |
| 446 | return NULL; | 447 | return NULL; |
| 447 | } | 448 | } |
| 448 | memset(area->pages, 0, array_size); | ||
| 449 | 449 | ||
| 450 | for (i = 0; i < area->nr_pages; i++) { | 450 | for (i = 0; i < area->nr_pages; i++) { |
| 451 | if (node < 0) | 451 | if (node < 0) |
