mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
[PATCH] vmalloc(): don't pass __GFP_ZERO to slab
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>
This commit is contained in:
parent
c430169e0c
commit
286e1ea3ac
1 changed files with 5 additions and 2 deletions
|
@ -428,8 +428,11 @@ void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
|
||||||
if (array_size > PAGE_SIZE) {
|
if (array_size > PAGE_SIZE) {
|
||||||
pages = __vmalloc_node(array_size, gfp_mask, PAGE_KERNEL, node);
|
pages = __vmalloc_node(array_size, gfp_mask, PAGE_KERNEL, node);
|
||||||
area->flags |= VM_VPAGES;
|
area->flags |= VM_VPAGES;
|
||||||
} else
|
} else {
|
||||||
pages = kmalloc_node(array_size, (gfp_mask & ~__GFP_HIGHMEM), node);
|
pages = kmalloc_node(array_size,
|
||||||
|
(gfp_mask & ~(__GFP_HIGHMEM | __GFP_ZERO)),
|
||||||
|
node);
|
||||||
|
}
|
||||||
area->pages = pages;
|
area->pages = pages;
|
||||||
if (!area->pages) {
|
if (!area->pages) {
|
||||||
remove_vm_area(area->addr);
|
remove_vm_area(area->addr);
|
||||||
|
|
Loading…
Reference in a new issue