Skip to contentSkip to conversation

Patch "mm: thp: avoid false positive VM_BUG_ON_PAGE in page_move_anon_rmap()" has been added to the 4.6-stable tree

PATCH [email protected] 1 participant 1 message Jun 5, 2016

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: thp: avoid false positive VM_BUG_ON_PAGE in page_move_anon_rmap()

to the 4.6-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-thp-avoid-false-positive-vm_bug_on_page-in-page_move_anon_rmap.patch
and it can be found in the queue-4.6 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 0798d3c022dc63eb0ec02b511e1f76ca8411ef8e Mon Sep 17 00:00:00 2001

From: "Kirill A. Shutemov" <[email protected]>
Date: Fri, 27 May 2016 14:27:38 -0700
Subject: mm: thp: avoid false positive VM_BUG_ON_PAGE in page_move_anon_rmap()

From: Kirill A. Shutemov <[email protected]>

commit 0798d3c022dc63eb0ec02b511e1f76ca8411ef8e upstream.

If page_move_anon_rmap() is refiling a pmd-splitted THP mapped in a tail page from a pte, the "address" must be THP aligned in order for the page->index bugcheck to pass in the CONFIG_DEBUG_VM=y builds.

---
 mm/rmap.c |    2 ++
 1 file changed, 2 insertions(+)
mm/rmap.c +2 -0
@@ -1098,6 +1098,8 @@ void page_move_anon_rmap(struct page *pa
 
 	VM_BUG_ON_PAGE(!PageLocked(page), page);
 	VM_BUG_ON_VMA(!anon_vma, vma);
+	if (IS_ENABLED(CONFIG_DEBUG_VM) && PageTransHuge(page))
+		address &= HPAGE_PMD_MASK;
 	VM_BUG_ON_PAGE(page->index != linear_page_index(vma, address), page);
 
 	anon_vma = (void *) anon_vma + PAGE_MAPPING_ANON;

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

queue-4.6/mm-compaction.c-fix-zoneindex-in-kcompactd.patch queue-4.6/mips-handle-highmem-pages-in-__update_cache.patch queue-4.6/mips-sync-icache-dcache-in-set_pte_at.patch queue-4.6/mm-thp-avoid-false-positive-vm_bug_on_page-in-page_move_anon_rmap.patch