HWPOISON, hugetlb: add free check to dequeue_hwpoison_huge_page()
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Wed, 8 Sep 2010 01:19:36 +0000 (10:19 +0900)
committerAndi Kleen <ak@linux.intel.com>
Fri, 8 Oct 2010 07:32:45 +0000 (09:32 +0200)
commit6de2b1aab94355482bd2accdc115666509667458
tree630a88dd5afe2c49a428179770140b22bbc9d7da
parent290408d4a25002f099efeee7b6a5778d431154d6
HWPOISON, hugetlb: add free check to dequeue_hwpoison_huge_page()

This check is necessary to avoid race between dequeue and allocation,
which can cause a free hugepage to be dequeued twice and get kernel unstable.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
include/linux/hugetlb.h
mm/hugetlb.c
mm/memory-failure.c