]> git.baikalelectronics.ru Git - kernel.git/commit
mm, hwpoison: add is_free_buddy_page() in HWPoisonHandlable()
authorNaoya Horiguchi <naoya.horiguchi@nec.com>
Fri, 24 Sep 2021 22:43:20 +0000 (15:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Sep 2021 23:13:34 +0000 (16:13 -0700)
commit1290dc942c594c3eaa9e1fc03c0d86d7647ebbef
treeb1d6df17791ca0e51abbb794617a207b0314756a
parent3fa776c173afafce467abaa5f2b546a284e4f67e
mm, hwpoison: add is_free_buddy_page() in HWPoisonHandlable()

Commit 9f56b25bfbf5 ("mm/hwpoison: retry with shake_page() for
unhandlable pages") changed the return value of __get_hwpoison_page() to
retry for transiently unhandlable cases.  However, __get_hwpoison_page()
currently fails to properly judge buddy pages as handlable, so hard/soft
offline for buddy pages always fail as "unhandlable page".  This is
totally regrettable.

So let's add is_free_buddy_page() in HWPoisonHandlable(), so that
__get_hwpoison_page() returns different return values between buddy
pages and unhandlable pages as intended.

Link: https://lkml.kernel.org/r/20210909004131.163221-1-naoya.horiguchi@linux.dev
Fixes: 9f56b25bfbf5 ("mm/hwpoison: retry with shake_page() for unhandlable pages")
Signed-off-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory-failure.c