hugetlb: fix race in alloc_fresh_huge_page()
authorJoe Jin <joe.jin@oracle.com>
Mon, 16 Jul 2007 06:38:12 +0000 (23:38 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Aug 2007 21:27:40 +0000 (14:27 -0700)
commit88656e13bea01b02f02a1dfcd3ba75a83e708648
tree21608b430b40a4777256bf893e07a0ca70e2fc79
parentb970e6468dcade5652f0ae02c99189efe1eefec6
hugetlb: fix race in alloc_fresh_huge_page()

That static `nid' index needs locking.  Without it we can end up calling
alloc_pages_node() with an illegal node ID and the kernel crashes.

Acked-by: Gurudas Pai <gurudas.pai@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/hugetlb.c