]> www.infradead.org Git - users/willy/xarray.git/commit
mm: support poison recovery from copy_present_page()
authorKefeng Wang <wangkefeng.wang@huawei.com>
Fri, 6 Sep 2024 02:42:01 +0000 (10:42 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 17 Sep 2024 08:07:00 +0000 (01:07 -0700)
commit658be46520ce480a44fe405730a1725166298f27
tree00abecaf0c8366e9d310f9d8cc22befe835ca152
parentaa549f923f5e037a459dcd588932db9abfa8c158
mm: support poison recovery from copy_present_page()

Similar to other poison recovery, use copy_mc_user_highpage() to avoid
potentially kernel panic during copy page in copy_present_page() from
fork, once copy failed due to hwpoison in source page, we need to break
out of copy in copy_pte_range() and release prealloc folio, so
copy_mc_user_highpage() is moved ahead before set *prealloc to NULL.

Link: https://lkml.kernel.org/r/20240906024201.1214712-3-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: Jane Chu <jane.chu@oracle.com>
Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Jiaqi Yan <jiaqiyan@google.com>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory.c