Skip to content

Commit

Permalink
[PATCH] vmalloc(): don't pass __GFP_ZERO to slab
Browse files Browse the repository at this point in the history
A recent change to the vmalloc() code accidentally resulted in us passing
__GFP_ZERO into the slab allocator.  But we only wanted __GFP_ZERO for the
actual pages whcih are being vmalloc()ed, and passing __GFP_ZERO into slab is
not a rational thing to ask for.

Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Oct 17, 2006
1 parent c430169 commit 286e1ea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mm/vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,11 @@ void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
if (array_size > PAGE_SIZE) {
pages = __vmalloc_node(array_size, gfp_mask, PAGE_KERNEL, node);
area->flags |= VM_VPAGES;
} else
pages = kmalloc_node(array_size, (gfp_mask & ~__GFP_HIGHMEM), node);
} else {
pages = kmalloc_node(array_size,
(gfp_mask & ~(__GFP_HIGHMEM | __GFP_ZERO)),
node);
}
area->pages = pages;
if (!area->pages) {
remove_vm_area(area->addr);
Expand Down

0 comments on commit 286e1ea

Please sign in to comment.