]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm, hwpoison: avoid trying to unpoison reserved page
authorMiaohe Lin <linmiaohe@huawei.com>
Thu, 18 Aug 2022 13:00:16 +0000 (21:00 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Aug 2022 05:03:06 +0000 (22:03 -0700)
commit7d043ae282e46688117f0625082f3e2f27dd44dd
tree2a3d7e818fcf6ce9426af37fbeb3ca8d98d05d57
parent25dbb43d40c99de09519f3249681b3dab8a9ebf7
mm, hwpoison: avoid trying to unpoison reserved page

For reserved pages, HWPoison flag will be set without increasing the page
refcnt.  So we shouldn't even try to unpoison these pages and thus
decrease the page refcnt unexpectly.  Add a PageReserved() check to filter
this case out and remove the below unneeded zero page (zero page is
reserved) check.

Link: https://lkml.kernel.org/r/20220818130016.45313-7-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