From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andi Kleen <andi@firstfloor.org>, Chen Yucong <slaoub@gmail.com>,
Naoya Horiguchi <nao.horiguchi@gmail.com>
Subject: [PATCH 1/2] hwpoison: fix hugetlbfs/thp precheck in hwpoison_user_mappings()
Date: Thu, 24 Jul 2014 15:50:52 -0400 [thread overview]
Message-ID: <1406231453-27928-1-git-send-email-n-horiguchi@ah.jp.nec.com> (raw)
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>
---
mm/memory-failure.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git mmotm-2014-07-22-15-58.orig/mm/memory-failure.c mmotm-2014-07-22-15-58/mm/memory-failure.c
index e3e2f007946e..f465b98d0209 100644
--- mmotm-2014-07-22-15-58.orig/mm/memory-failure.c
+++ mmotm-2014-07-22-15-58/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;
/*
--
1.9.3
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2014-07-24 19:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-24 19:50 Naoya Horiguchi [this message]
2014-07-24 19:50 ` [PATCH 2/2] hwpoison: call action_result() in failure path of hwpoison_user_mappings() Naoya Horiguchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1406231453-27928-1-git-send-email-n-horiguchi@ah.jp.nec.com \
--to=n-horiguchi@ah.jp.nec.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nao.horiguchi@gmail.com \
--cc=slaoub@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox