]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mm/hwpoison: fix wrong num_poisoned_pages accounting
authorMinchan Kim <minchan@kernel.org>
Thu, 28 Apr 2016 23:18:44 +0000 (16:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 May 2016 21:48:49 +0000 (14:48 -0700)
commit36abe7272a248a7e47a4cec8d8ec9c76ef387bac
tree4dc4d122a0ba7f63ca70d4b64b7468a3e160b6c1
parent87c855f150be9317b9b6ad82c1611ed8d577d986
mm/hwpoison: fix wrong num_poisoned_pages accounting

commit d7e69488bd04de165667f6bc741c1c0ec6042ab9 upstream.

Currently, migration code increses num_poisoned_pages on *failed*
migration page as well as successfully migrated one at the trial of
memory-failure.  It will make the stat wrong.  As well, it marks the
page as PG_HWPoison even if the migration trial failed.  It would mean
we cannot recover the corrupted page using memory-failure facility.

This patches fixes it.

Signed-off-by: Minchan Kim <minchan@kernel.org>
Reported-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/migrate.c