diff options
author | Anshuman Khandual <khandual@linux.vnet.ibm.com> | 2017-09-08 16:13:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-08 18:26:47 -0700 |
commit | 149728e91349f269d6fc82b4ca2552645dfa7d2c (patch) | |
tree | e180a774ca09f470d2931c622f1927501874990a /mm/mempolicy.c | |
parent | b6b1fd2a6bedd533aeed83924d7be0e944fded9f (diff) | |
download | linux-149728e91349f269d6fc82b4ca2552645dfa7d2c.tar.bz2 |
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r-- | mm/mempolicy.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 1f5db48adc9c..006ba625c0b8 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -2233,17 +2233,12 @@ int mpol_misplaced(struct page *page, struct vm_area_struct *vma, unsigned long 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); - pgoff = vma->vm_pgoff; pgoff += (addr - vma->vm_start) >> PAGE_SHIFT; polnid = offset_il_node(pol, pgoff); |