]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] Fix GFP_HIGHMEM slab panic
authorGiridhar Pemmasani <pgiri@yahoo.com>
Sun, 29 Oct 2006 12:46:55 +0000 (04:46 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 29 Oct 2006 16:01:58 +0000 (08:01 -0800)
commit50b76aa9e8804c56472864bcc7bab181cb2367c9
tree437c827044b2ed0a277adc95182985d8a95a8fc0
parenta766b34c242b0ecc9f85adc3558f36b0bf4a28e4
[PATCH] Fix GFP_HIGHMEM slab panic

As reported by Martin J. Bligh <mbligh@google.com>, we let through some
non-slab bits to slab allocation through __get_vm_area_node when doing a
vmalloc.

I haven't been able to reproduce this, although I understand why it
happens: vmalloc allocates memory with

GFP_KERNEL | __GFP_HIGHMEM

and commit 2e1fbe7c5222e8690dc5f54f6423ef1f4e25fb47 resulted in the same
flags are passed down to cache_alloc_refill, causing the BUG.  The
following patch fixes it.

Note that when calling kmalloc_node, I am masking off __GFP_HIGHMEM with
GFP_LEVEL_MASK, whereas __vmalloc_area_node does the same with

~(__GFP_HIGHMEM | __GFP_ZERO).

IMHO, using GFP_LEVEL_MASK is preferable, but either should fix this
problem.

Signed-off-by: Giridhar Pemmasani (pgiri@yahoo.com)
Cc: Martin J. Bligh <mbligh@google.com>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/vmalloc.c