From: Naoya Horiguchi Date: Tue, 5 May 2015 23:23:52 +0000 (-0700) Subject: mm/hwpoison-inject: check PageLRU of hpage X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e386eed89c764f102fcc3c0d4c78c65a357f7399;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mm/hwpoison-inject: check PageLRU of hpage Hwpoison injector checks PageLRU of the raw target page to find out whether the page is an appropriate target, but current code now filters out thp tail pages, which prevents us from testing for such cases via this interface. So let's check hpage instead of p. Signed-off-by: Naoya Horiguchi Acked-by: Dean Nelson Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Hidetoshi Seto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/hwpoison-inject.c b/mm/hwpoison-inject.c index 2b3f933e3282..4ca5fe0042e1 100644 --- a/mm/hwpoison-inject.c +++ b/mm/hwpoison-inject.c @@ -34,12 +34,12 @@ static int hwpoison_inject(void *data, u64 val) if (!hwpoison_filter_enable) goto inject; - if (!PageLRU(p) && !PageHuge(p)) - shake_page(p, 0); + if (!PageLRU(hpage) && !PageHuge(p)) + shake_page(hpage, 0); /* * This implies unable to support non-LRU pages. */ - if (!PageLRU(p) && !PageHuge(p)) + if (!PageLRU(hpage) && !PageHuge(p)) goto put_out; /*