+ mm-bad_page-checks-bad_flags-instead-of-page-flags-for-hwpoison-page.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm: bad_page() checks bad_flags instead of page->flags for hwpoison page
has been added to the -mm tree.  Its filename is
     mm-bad_page-checks-bad_flags-instead-of-page-flags-for-hwpoison-page.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-bad_page-checks-bad_flags-instead-of-page-flags-for-hwpoison-page.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-bad_page-checks-bad_flags-instead-of-page-flags-for-hwpoison-page.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx>
Subject: mm: bad_page() checks bad_flags instead of page->flags for hwpoison page

There's a race window between checking page->flags and unpoisoning, which
taints kernel with "BUG: Bad page state".  That's overkill.  It's safer to
use bad_flags to detect hwpoisoned page.

Link: http://lkml.kernel.org/r/1463470975-29972-1-git-send-email-n-horiguchi@xxxxxxxxxxxxx
Signed-off-by: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/page_alloc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN mm/page_alloc.c~mm-bad_page-checks-bad_flags-instead-of-page-flags-for-hwpoison-page mm/page_alloc.c
--- a/mm/page_alloc.c~mm-bad_page-checks-bad_flags-instead-of-page-flags-for-hwpoison-page
+++ a/mm/page_alloc.c
@@ -522,8 +522,8 @@ static void bad_page(struct page *page,
 	static unsigned long nr_shown;
 	static unsigned long nr_unshown;
 
-	/* Don't complain about poisoned pages */
-	if (PageHWPoison(page)) {
+	/* Don't complain about hwpoisoned pages */
+	if (bad_flags == __PG_HWPOISON) {
 		page_mapcount_reset(page); /* remove PageBuddy */
 		return;
 	}
_

Patches currently in -mm which might be from n-horiguchi@xxxxxxxxxxxxx are

mm-bad_page-checks-bad_flags-instead-of-page-flags-for-hwpoison-page.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux