diff options
author | Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> | 2015-09-22 14:59:14 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-22 14:49:20 -0700 |
commit | 9a8d4105affd364d3b266834b5ce4b207e0eb97d (patch) | |
tree | dcd87a2816286f9a792e85869c8f9ede70d35e32 /mm | |
parent | 1bda8dbe4d7c985f4679f094e68b90fdffe67858 (diff) | |
download | lwn-9a8d4105affd364d3b266834b5ce4b207e0eb97d.tar.gz lwn-9a8d4105affd364d3b266834b5ce4b207e0eb97d.zip |
mm: migrate: hugetlb: putback destination hugepage to active list
commit 3aaa76e125c1dd58c9b599baa8c6021896874c12 upstream.
Since commit bcc54222309c ("mm: hugetlb: introduce page_huge_active")
each hugetlb page maintains its active flag to avoid a race condition
betwe= en multiple calls of isolate_huge_page(), but current kernel
doesn't set the f= lag on a hugepage allocated by migration because the
proper putback routine isn= 't called. This means that users could
still encounter the race referred to by bcc54222309c in this special
case, so this patch fixes it.
Fixes: bcc54222309c ("mm: hugetlb: introduce page_huge_active")
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Hugh Dickins <hughd@google.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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/migrate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index eb4267107d1f..d615e4f74623 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1068,7 +1068,7 @@ out: if (rc != MIGRATEPAGE_SUCCESS && put_new_page) put_new_page(new_hpage, private); else - put_page(new_hpage); + putback_active_hugepage(new_hpage); if (result) { if (rc) |