Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1381623
| From | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] mm/memory-failure: fix race with compound page split/merge |
| Date | 2016-04-18 13:50 +0200 |
| Message-ID | <rpfQJ-4Ut-11@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Get_hwpoison_page() must recheck relation between head and tail pages.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
---
mm/memory-failure.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 78f5f2641b91..ca5acee53b7a 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -888,7 +888,15 @@ int get_hwpoison_page(struct page *page)
}
}
- return get_page_unless_zero(head);
+ if (get_page_unless_zero(head)) {
+ if (head == compound_head(page))
+ return 1;
+
+ pr_info("MCE: %#lx cannot catch tail\n", page_to_pfn(page));
+ put_page(head);
+ }
+
+ return 0;
}
EXPORT_SYMBOL_GPL(get_hwpoison_page);
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] mm/memory-failure: fix race with compound page split/merge Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2016-04-18 13:50 +0200
Re: [PATCH] mm/memory-failure: fix race with compound page split/merge Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> - 2016-04-19 01:20 +0200
Re: [PATCH] mm/memory-failure: fix race with compound page split/merge Konstantin Khlebnikov <koct9i@gmail.com> - 2016-04-19 08:00 +0200
Re: [PATCH] mm/memory-failure: fix race with compound page split/merge Andrew Morton <akpm@linux-foundation.org> - 2016-04-22 01:50 +0200
csiph-web