Message ID | 20220830123604.25763-6-linmiaohe@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | A few cleanup patches for memory-failure | expand |
On Tue, Aug 30, 2022 at 08:36:03PM +0800, Miaohe Lin wrote: > 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(). > > Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 904c2b6284a4..fb6a10005109 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1406,7 +1406,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;
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(). Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)