diff options
author | Naoya Horiguchi <[email protected]> | 2022-07-14 13:24:17 +0900 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2022-08-08 18:06:44 -0700 |
commit | 38f6d29397ccb9c191c4c91103e8123f518fdc10 (patch) | |
tree | 52b39712979fd983a3e5134fcb6803f9454ca875 /tools/perf/util/trace-event-scripting.c | |
parent | ac5fcde0a96a18773f06b7c00c5ea081bbdc64b3 (diff) |
mm, hwpoison: set PG_hwpoison for busy hugetlb pages
If memory_failure() fails to grab page refcount on a hugetlb page because
it's busy, it returns without setting PG_hwpoison on it. This not only
loses a chance of error containment, but breaks the rule that
action_result() should be called only when memory_failure() do any of
handling work (even if that's just setting PG_hwpoison). This
inconsistency could harm code maintainability.
So set PG_hwpoison and call hugetlb_set_page_hwpoison() for such a case.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 405ce051236c ("mm/hwpoison: fix race between hugetlb free/demotion and memory_failure_hugetlb()")
Signed-off-by: Naoya Horiguchi <[email protected]>
Reviewed-by: Miaohe Lin <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: kernel test robot <[email protected]>
Cc: Liu Shixin <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Yang Shi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions