]> git.baikalelectronics.ru Git - kernel.git/commit
mm, hwpoison: fix extra put_page() in soft_offline_page()
authorMiaohe Lin <linmiaohe@huawei.com>
Thu, 18 Aug 2022 13:00:13 +0000 (21:00 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 12 Sep 2022 03:25:57 +0000 (20:25 -0700)
commita112e196c057e2422347f8458688ac71b992000d
treecf2124bc0866f51172337ab6a7f61fa31a738adc
parent073b1903c187cf7d787f3fd0f81867eac0671ba1
mm, hwpoison: fix extra put_page() in soft_offline_page()

When hwpoison_filter() refuses to soft offline a page, the page refcnt
incremented previously by MF_COUNT_INCREASED would have been consumed via
get_hwpoison_page() if ret <= 0.  So the put_ref_page() here will put the
extra one.  Remove it to fix the issue.

Link: https://lkml.kernel.org/r/20220818130016.45313-4-linmiaohe@huawei.com
Fixes: f0690ca9d415 ("mm/memory-failure.c: add hwpoison_filter for soft offline")
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