mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 22:21:21 +00:00
mm/migration: fix page corruption during hugepage migration
If migrate_huge_page by memory-failure fails , it calls put_page in itself
to decrease page reference and caller of migrate_huge_page also calls
putback_lru_pages. It can do double free of page so it can make page
corruption on page holder.
In addtion, clean of pages on caller is consistent behavior with
migrate_pages by cf608ac19c
("mm: compaction: fix COMPACTPAGEFAILED
counting").
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
57fc4a5ee3
commit
48db54ee2f
2 changed files with 4 additions and 5 deletions
|
@ -980,10 +980,6 @@ int migrate_huge_pages(struct list_head *from,
|
|||
}
|
||||
rc = 0;
|
||||
out:
|
||||
|
||||
list_for_each_entry_safe(page, page2, from, lru)
|
||||
put_page(page);
|
||||
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue