diff options
author | Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> | 2014-07-31 01:08:28 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-07-31 02:16:13 +0200 |
commit | 93a9eb39fad1b5fc9077776caa3af207883b254d (patch) | |
tree | 8090414d47460b63abcc563fee37013cc9f6c530 /mm/memory-failure.c | |
parent | rapidio/tsi721_dma: fix failure to obtain transaction descriptor (diff) | |
download | linux-93a9eb39fad1b5fc9077776caa3af207883b254d.tar.xz linux-93a9eb39fad1b5fc9077776caa3af207883b254d.zip |
hwpoison: fix hugetlbfs/thp precheck in hwpoison_user_mappings()
A recent fix from Chen Yucong, commit 0bc1f8b0682c ("hwpoison: fix the
handling path of the victimized page frame that belong to non-LRU")
rejects going into unmapping operation for hugetlbfs/thp pages, which
results in failing error containing on such pages. This patch fixes it.
With this patch, hwpoison functional tests in mce-test testsuite pass.
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Chen Yucong <slaoub@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r-- | mm/memory-failure.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 7211a73ba14d..3db261fdee4c 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -895,7 +895,13 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn, struct page *hpage = *hpagep; struct page *ppage; - if (PageReserved(p) || PageSlab(p) || !PageLRU(p)) + /* + * Here we are interested only in user-mapped pages, so skip any + * other types of pages. + */ + if (PageReserved(p) || PageSlab(p)) + return SWAP_SUCCESS; + if (!(PageLRU(hpage) || PageHuge(p))) return SWAP_SUCCESS; /* |