Skip to content
Commit d7e69488 authored by Minchan Kim's avatar Minchan Kim Committed by Linus Torvalds
Browse files

mm/hwpoison: fix wrong num_poisoned_pages accounting



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: default avatarMinchan Kim <minchan@kernel.org>
Reported-by: default avatarVlastimil Babka <vbabka@suse.cz>
Acked-by: default avatarNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b06bad17
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment