]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - mm/page_alloc.c
mm: check __PG_HWPOISON separately from PAGE_FLAGS_CHECK_AT_*
[linux.git] / mm / page_alloc.c
index cb61f44eb3fc4420406d72a04ad168b55524c47f..beda4171080232f37e779a3658045e1f813a1cff 100644 (file)
@@ -1296,6 +1296,10 @@ static inline int check_new_page(struct page *page)
                bad_reason = "non-NULL mapping";
        if (unlikely(atomic_read(&page->_count) != 0))
                bad_reason = "nonzero _count";
+       if (unlikely(page->flags & __PG_HWPOISON)) {
+               bad_reason = "HWPoisoned (hardware-corrupted)";
+               bad_flags = __PG_HWPOISON;
+       }
        if (unlikely(page->flags & PAGE_FLAGS_CHECK_AT_PREP)) {
                bad_reason = "PAGE_FLAGS_CHECK_AT_PREP flag set";
                bad_flags = PAGE_FLAGS_CHECK_AT_PREP;