From: Hugh Dickins Date: Tue, 13 Oct 2009 14:02:11 +0000 (+0100) Subject: HWPOISON: fix oops on ksm pages X-Git-Tag: upstream/snapshot3+hdmi~16715^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01e00f880ca700376e1845cf7a2524ebe68e47d6;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git HWPOISON: fix oops on ksm pages Memory failure on a KSM page currently oopses on its NULL anon_vma in page_lock_anon_vma(): that may not be much worse than the consequence of ignoring it, but it is better to be consistent with how ZERO_PAGE and hugetlb pages and other awkward cases are treated. Just skip it. Signed-off-by: Hugh Dickins Signed-off-by: Andi Kleen --- diff --git a/mm/memory-failure.c b/mm/memory-failure.c index e17ec3f..e354b9f 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -644,7 +645,7 @@ static void hwpoison_user_mappings(struct page *p, unsigned long pfn, int i; int kill = 1; - if (PageReserved(p) || PageCompound(p) || PageSlab(p)) + if (PageReserved(p) || PageCompound(p) || PageSlab(p) || PageKsm(p)) return; /*