Skip to content

Commit e386eed

Browse files
Naoya Horiguchitorvalds
authored andcommitted
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 <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>
1 parent 7ea434a commit e386eed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mm/hwpoison-inject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ static int hwpoison_inject(void *data, u64 val)
3434
if (!hwpoison_filter_enable)
3535
goto inject;
3636

37-
if (!PageLRU(p) && !PageHuge(p))
38-
shake_page(p, 0);
37+
if (!PageLRU(hpage) && !PageHuge(p))
38+
shake_page(hpage, 0);
3939
/*
4040
* This implies unable to support non-LRU pages.
4141
*/
42-
if (!PageLRU(p) && !PageHuge(p))
42+
if (!PageLRU(hpage) && !PageHuge(p))
4343
goto put_out;
4444

4545
/*

0 commit comments

Comments
 (0)