]> git.baikalelectronics.ru Git - kernel.git/commit
mm: soft-offline: fix num_poisoned_pages counting on concurrent events
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Tue, 5 May 2015 23:23:46 +0000 (16:23 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 6 May 2015 00:10:10 +0000 (17:10 -0700)
commitc0a0da6acac2ae781289351158c287b5ec4c6a47
tree0cf960b93d33ac4f3d27c6dd5b5af3856f7eadae
parent343dc4f2c2e5b3c65c201960e98a8a41031461b5
mm: soft-offline: fix num_poisoned_pages counting on concurrent events

If multiple soft offline events hit one free page/hugepage concurrently,
soft_offline_page() can handle the free page/hugepage multiple times,
which makes num_poisoned_pages counter increased more than once.  This
patch fixes this wrong counting by checking TestSetPageHWPoison for normal
papes and by checking the return value of dequeue_hwpoisoned_huge_page()
for hugepages.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Dean Nelson <dnelson@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: <stable@vger.kernel.org> [3.14+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory-failure.c