[merged] mm-new_vma_page-cannot-see-null-vma-for-hugetlb-pages.patch removed from -mm tree

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

 



Subject: [merged] mm-new_vma_page-cannot-see-null-vma-for-hugetlb-pages.patch removed from -mm tree
To: mhocko@xxxxxxx,bob.liu@xxxxxxxxxx,liwanp@xxxxxxxxxxxxxxxxxx,n-horiguchi@xxxxxxxxxxxxx,sasha.levin@xxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Fri, 24 Jan 2014 10:59:05 -0800


The patch titled
     Subject: mm: new_vma_page() cannot see NULL vma for hugetlb pages
has been removed from the -mm tree.  Its filename was
     mm-new_vma_page-cannot-see-null-vma-for-hugetlb-pages.patch

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

------------------------------------------------------
From: Michal Hocko <mhocko@xxxxxxx>
Subject: mm: new_vma_page() cannot see NULL vma for hugetlb pages

11c731e81bb0 ("mm/mempolicy: fix !vma in new_vma_page()") has removed
BUG_ON(!vma) from new_vma_page which is partially correct because
page_address_in_vma will return EFAULT for non-linear mappings and at
least shared shmem might be mapped this way.

The patch also tried to prevent NULL ptr for hugetlb pages which is not
correct AFAICS because hugetlb pages cannot be mapped as VM_NONLINEAR and
other conditions in page_address_in_vma seem to be legit and catch real
bugs.

This patch restores BUG_ON for PageHuge to catch potential issues when the
to-be-migrated page is not setup properly.

Signed-off-by: Michal Hocko <mhocko@xxxxxxx>
Reviewed-by: Bob Liu <bob.liu@xxxxxxxxxx>
Cc: Sasha Levin <sasha.levin@xxxxxxxxxx>
Cc: Wanpeng Li <liwanp@xxxxxxxxxxxxxxxxxx>
Cc: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/mempolicy.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff -puN mm/mempolicy.c~mm-new_vma_page-cannot-see-null-vma-for-hugetlb-pages mm/mempolicy.c
--- a/mm/mempolicy.c~mm-new_vma_page-cannot-see-null-vma-for-hugetlb-pages
+++ a/mm/mempolicy.c
@@ -1199,10 +1199,8 @@ static struct page *new_vma_page(struct
 	}
 
 	if (PageHuge(page)) {
-		if (vma)
-			return alloc_huge_page_noerr(vma, address, 1);
-		else
-			return NULL;
+		BUG_ON(!vma);
+		return alloc_huge_page_noerr(vma, address, 1);
 	}
 	/*
 	 * if !vma, alloc_page_vma() will use task or system default policy
_

Patches currently in -mm which might be from mhocko@xxxxxxx are

origin.patch
mm-page_alloc-allow-__gfp_nofail-to-allocate-below-watermarks-after-reclaim.patch
memcg-do-not-hang-on-oom-when-killed-by-userspace-oom-access-to-memory-reserves.patch
mm-vmscan-respect-numa-policy-mask-when-shrinking-slab-on-direct-reclaim.patch
mm-vmscan-move-call-to-shrink_slab-to-shrink_zones.patch
mm-vmscan-remove-shrink_control-arg-from-do_try_to_free_pages.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