diff options
-rw-r--r-- | mm/madvise.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/madvise.c b/mm/madvise.c index 9b1c7be182d7..30293ab95b06 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -352,6 +352,10 @@ static int madvise_hwpoison(int bhv, unsigned long start, unsigned long end) int ret = get_user_pages_fast(start, 1, 0, &p); if (ret != 1) return ret; + if (PageHWPoison(p)) { + put_page(p); + continue; + } if (bhv == MADV_SOFT_OFFLINE) { pr_info("Soft offlining page %#lx at %#lx\n", page_to_pfn(p), start); |