mm/mempolicy.c: remove BUG_ON() checks for VMA inside mpol_misplaced()
Subsystems (2)
[email protected]
maintainerPATCH 48/126 mm/mempolicy.c: remove BUG_ON() checks for VMA inside mpol_misplaced()
From: Anshuman Khandual <[email protected]>
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.
Signed-off-by Anshuman Khandual <[email protected]>
Suggested-by Vlastimil Babka <[email protected]>
Acked-by Vlastimil Babka <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/mempolicy.c | 5 ----- 1 file changed, 5 deletions(-)
mm/mempolicy.c renamed from mm/mempolicy.c~mm-mempolicy-remove-bug_on-checks-for-vma-inside-mpol_misplaced +0 -4
@@ -2233,17 +2233,12 @@ int mpol_misplaced(struct page *page, stint 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);