All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-mempolicy-remove-bug_on-checks-for-vma-inside-mpol_misplaced.patch added to -mm tree
@ 2017-09-05 23:57 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2017-09-05 23:57 UTC (permalink / raw)
  To: khandual, vbabka, mm-commits


The patch titled
     Subject: mm/mempolicy.c: remove BUG_ON() checks for VMA inside mpol_misplaced()
has been added to the -mm tree.  Its filename is
     mm-mempolicy-remove-bug_on-checks-for-vma-inside-mpol_misplaced.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-mempolicy-remove-bug_on-checks-for-vma-inside-mpol_misplaced.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-mempolicy-remove-bug_on-checks-for-vma-inside-mpol_misplaced.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Subject: mm/mempolicy.c: remove BUG_ON() checks for VMA inside mpol_misplaced()

VMA and its address bounds checks are too late in this function.  They
must have been verified earlier in the page fault sequence.  Hence just
remove them.

Link: http://lkml.kernel.org/r/20170901130137.7617-1-khandual@linux.vnet.ibm.com
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/mempolicy.c |    5 -----
 1 file changed, 5 deletions(-)

diff -puN mm/mempolicy.c~mm-mempolicy-remove-bug_on-checks-for-vma-inside-mpol_misplaced mm/mempolicy.c
--- a/mm/mempolicy.c~mm-mempolicy-remove-bug_on-checks-for-vma-inside-mpol_misplaced
+++ a/mm/mempolicy.c
@@ -2233,17 +2233,12 @@ int mpol_misplaced(struct page *page, st
 	int polnid = -1;
 	int ret = -1;
 
-	BUG_ON(!vma);
-
 	pol = get_vma_policy(vma, addr);
 	if (!(pol->flags & MPOL_F_MOF))
 		goto out;
 
 	switch (pol->mode) {
 	case MPOL_INTERLEAVE:
-		BUG_ON(addr >= vma->vm_end);
-		BUG_ON(addr < vma->vm_start);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-05 23:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-05 23:57 + mm-mempolicy-remove-bug_on-checks-for-vma-inside-mpol_misplaced.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.