diff options
-rw-r--r-- | mm/memory-failure.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index f75a2ed72e69..086ae4eb3421 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1534,6 +1534,14 @@ static int memory_failure_hugetlb(unsigned long pfn, int flags) lock_page(head); page_flags = head->flags; + if (hwpoison_filter(p)) { + if (TestClearPageHWPoison(head)) + num_poisoned_pages_dec(); + put_page(p); + res = -EOPNOTSUPP; + goto out; + } + /* * TODO: hwpoison for pud-sized hugetlb doesn't work right now, so * simply disable it. In order to make it work properly, we need |