Skip to content

Commit

Permalink
mm/hwpoison-inject: check PageLRU of hpage
Browse files Browse the repository at this point in the history
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 <n-horiguchi@ah.jp.nec.com>
Acked-by: Dean Nelson <dnelson@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Naoya Horiguchi authored and torvalds committed May 6, 2015
1 parent 7ea434a commit e386eed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mm/hwpoison-inject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit e386eed

Please sign in to comment.