[merged] thp-fix-memory-failure-hugetlbfs-vs-thp-collision.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     thp: fix memory-failure hugetlbfs vs THP collision
has been removed from the -mm tree.  Its filename was
     thp-fix-memory-failure-hugetlbfs-vs-thp-collision.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: thp: fix memory-failure hugetlbfs vs THP collision
From: Andrea Arcangeli <aarcange@xxxxxxxxxx>

hugetlbfs was changed to allow memory failure to migrate the hugetlbfs
pages and that broke THP as split_huge_page was then called on hugetlbfs
pages too.

compound_head/order was also run unsafe on THP pages that can be splitted
at any time.

All compound_head() invocations in memory-failure.c that are run on pages
that aren't pinned and that can be freed and reused from under us (while
compound_head is running) are buggy because compound_head can return a
dangling pointer, but I'm not fixing this as this is a generic
memory-failure bug not specific to THP but it applies to hugetlbfs too, so
I can fix it later after THP is merged upstream.

Signed-off-by: Andrea Arcangeli <aarcange@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/memory-failure.c |    2 +-
 mm/rmap.c           |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -puN mm/memory-failure.c~thp-fix-memory-failure-hugetlbfs-vs-thp-collision mm/memory-failure.c
--- a/mm/memory-failure.c~thp-fix-memory-failure-hugetlbfs-vs-thp-collision
+++ a/mm/memory-failure.c
@@ -386,7 +386,7 @@ static void collect_procs_anon(struct pa
 	struct task_struct *tsk;
 	struct anon_vma *av;
 
-	if (unlikely(split_huge_page(page)))
+	if (!PageHuge(page) && unlikely(split_huge_page(page)))
 		return;
 	read_lock(&tasklist_lock);
 	av = page_lock_anon_vma(page);
diff -puN mm/rmap.c~thp-fix-memory-failure-hugetlbfs-vs-thp-collision mm/rmap.c
--- a/mm/rmap.c~thp-fix-memory-failure-hugetlbfs-vs-thp-collision
+++ a/mm/rmap.c
@@ -1430,7 +1430,7 @@ int try_to_unmap(struct page *page, enum
 	int ret;
 
 	BUG_ON(!PageLocked(page));
-	BUG_ON(PageTransHuge(page));
+	VM_BUG_ON(!PageHuge(page) && PageTransHuge(page));
 
 	if (unlikely(PageKsm(page)))
 		ret = try_to_unmap_ksm(page, flags);
_

Patches currently in -mm which might be from aarcange@xxxxxxxxxx are

origin.patch
thp-add-pagetranscompound.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux