diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-01 17:14:06 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-01 17:14:06 +0000 |
commit | e616d72f8b12df275e5afd05b0f5ed251f6d56a1 (patch) | |
tree | cfbdd162315fce0266b5aa12c070ff08a6d8f4a7 /mm/memory-failure.c | |
parent | Releasing progress-linux version 6.9.2-1~exp1~progress7.99u1. (diff) | |
download | linux-e616d72f8b12df275e5afd05b0f5ed251f6d56a1.tar.xz linux-e616d72f8b12df275e5afd05b0f5ed251f6d56a1.zip |
Merging upstream version 6.9.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r-- | mm/memory-failure.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 9e62a00b46..7751bd78fb 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1218,7 +1218,7 @@ static int me_huge_page(struct page_state *ps, struct page *p) * subpages. */ folio_put(folio); - if (__page_handle_poison(p) >= 0) { + if (__page_handle_poison(p) > 0) { page_ref_inc(p); res = MF_RECOVERED; } else { @@ -2097,7 +2097,7 @@ retry: */ if (res == 0) { folio_unlock(folio); - if (__page_handle_poison(p) >= 0) { + if (__page_handle_poison(p) > 0) { page_ref_inc(p); res = MF_RECOVERED; } else { @@ -2550,6 +2550,13 @@ int unpoison_memory(unsigned long pfn) goto unlock_mutex; } + if (is_huge_zero_page(&folio->page)) { + unpoison_pr_info("Unpoison: huge zero page is not supported %#lx\n", + pfn, &unpoison_rs); + ret = -EOPNOTSUPP; + goto unlock_mutex; + } + if (!PageHWPoison(p)) { unpoison_pr_info("Unpoison: Page was already unpoisoned %#lx\n", pfn, &unpoison_rs); |