From: Miaohe Lin Date: Tue, 23 Aug 2022 03:23:45 +0000 (+0800) Subject: mm-hwpoison-kill-procs-if-unmap-fails-v2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=25dbb43d40c99de09519f3249681b3dab8a9ebf7;p=users%2Fjedix%2Flinux-maple.git mm-hwpoison-kill-procs-if-unmap-fails-v2 If try_to_unmap() fails, the hwpoisoned page still resides in the address space of some processes. We should kill these processes or the hwpoisoned page might be consumed later. collect_procs() is always called to collect relevant processes now so they can be killed later if unmap fails. Link: https://lkml.kernel.org/r/20220823032346.4260-6-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton --- diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 8eefdd58a323..aba275bbf07e 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1448,9 +1448,6 @@ static bool hwpoison_user_mappings(struct page *p, unsigned long pfn, * First collect all the processes that have the page * mapped in dirty form. This has to be done before try_to_unmap, * because ttu takes the rmap data structures down. - * - * Error handling: We ignore errors here because - * there's nothing that can be done. */ collect_procs(hpage, &tokill, flags & MF_ACTION_REQUIRED);