summaryrefslogtreecommitdiff
path: root/mm/memory-failure.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2022-08-30 15:36:03 +0300
committerAndrew Morton <akpm@linux-foundation.org>2022-09-27 05:46:04 +0300
commitb680dae9a881bbf80dc53a79a59e4f1386b7da5e (patch)
tree64c1f94458215b85846f9ed6ef1853b0d74ad4aa /mm/memory-failure.c
parent36537a67d3561bfe2b3654161d6c9008fff84d43 (diff)
downloadlinux-b680dae9a881bbf80dc53a79a59e4f1386b7da5e.tar.xz
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.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r--mm/memory-failure.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index cca8264dda1b..3034078abe63 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -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
* other types of pages.
*/
- if (PageReserved(p) || PageSlab(p))
+ if (PageReserved(p) || PageSlab(p) || PageTable(p))
return true;
if (!(PageLRU(hpage) || PageHuge(p)))
return true;