Commit b680dae9 authored by Miaohe Lin's avatar Miaohe Lin Committed by Andrew Morton

mm, hwpoison: check PageTable() explicitly in hwpoison_user_mappings()

PageTable can't be handled by memory_failure(). Filter it out explicitly in
hwpoison_user_mappings(). This will also make code more consistent with the
relevant check in unpoison_memory().

Link: https://lkml.kernel.org/r/20220830123604.25763-6-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Acked-by: default avatarNaoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 36537a67
...@@ -1409,7 +1409,7 @@ static bool hwpoison_user_mappings(struct page *p, unsigned long pfn, ...@@ -1409,7 +1409,7 @@ static bool hwpoison_user_mappings(struct page *p, unsigned long pfn,
* Here we are interested only in user-mapped pages, so skip any * Here we are interested only in user-mapped pages, so skip any
* other types of pages. * other types of pages.
*/ */
if (PageReserved(p) || PageSlab(p)) if (PageReserved(p) || PageSlab(p) || PageTable(p))
return true; return true;
if (!(PageLRU(hpage) || PageHuge(p))) if (!(PageLRU(hpage) || PageHuge(p)))
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment