From: Chen Yucong Date: Thu, 22 May 2014 18:54:15 +0000 (-0700) Subject: hwpoison, hugetlb: lock_page/unlock_page does not match for handling a free hugepage X-Git-Tag: omap-for-v3.16/fixes-against-rc1~150^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b985194c8c0a130ed155b71662e39f7eaea4876f;p=pandora-kernel.git hwpoison, hugetlb: lock_page/unlock_page does not match for handling a free hugepage For handling a free hugepage in memory failure, the race will happen if another thread hwpoisoned this hugepage concurrently. So we need to check PageHWPoison instead of !PageHWPoison. If hwpoison_filter(p) returns true or a race happens, then we need to unlock_page(hpage). Signed-off-by: Chen Yucong Reviewed-by: Naoya Horiguchi Tested-by: Naoya Horiguchi Reviewed-by: Andi Kleen Cc: [2.6.36+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed