Skip to contentSkip to conversation

Patch "mm: migrate: hugetlb: putback destination hugepage to active list" has been added to the 4.2-stable tree

PATCH [email protected] 1 participant 1 message Oct 17, 2015

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

mm: migrate: hugetlb: putback destination hugepage to active list

to the 4.2-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
mm-migrate-hugetlb-putback-destination-hugepage-to-active-list.patch
and it can be found in the queue-4.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 3aaa76e125c1dd58c9b599baa8c6021896874c12 Mon Sep 17 00:00:00 2001

From: Naoya Horiguchi <[email protected]>
Date: Tue, 22 Sep 2015 14:59:14 -0700
Subject: mm: migrate: hugetlb: putback destination hugepage to active list

From: Naoya Horiguchi <[email protected]>

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")
Cc Michal Hocko <[email protected]>
Cc Andi Kleen <[email protected]>
Cc Hugh Dickins <[email protected]>
---
 mm/migrate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/migrate.c +1 -1
@@ -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)

Patches currently in stable-queue which might be from [email protected] are

queue-4.2/mm-hugetlbfs-skip-shared-vmas-when-unmapping-private-pages-to-satisfy-a-fault.patch queue-4.2/mm-migrate-hugetlb-putback-destination-hugepage-to-active-list.patch