]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm-hwpoison-kill-procs-if-unmap-fails-v2
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 23 Aug 2022 03:23:45 +0000 (11:23 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Aug 2022 05:03:06 +0000 (22:03 -0700)
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 <linmiaohe@huawei.com>
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory-failure.c

index 8eefdd58a323a1a5605e6169fcbb54b8d0462b11..aba275bbf07ed3b91c7229a87057463356a0251c 100644 (file)
@@ -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);