Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1322623 > unrolled thread

[PATCH v4 1/8] mm: Convert an open-coded VM_BUG_ON_VMA

Started byMatthew Wilcox <matthew.r.wilcox@intel.com>
First post2016-01-31 13:20 +0100
Last post2016-01-31 13:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v4 1/8] mm: Convert an open-coded VM_BUG_ON_VMA Matthew Wilcox <matthew.r.wilcox@intel.com> - 2016-01-31 13:20 +0100

#1322623 — [PATCH v4 1/8] mm: Convert an open-coded VM_BUG_ON_VMA

FromMatthew Wilcox <matthew.r.wilcox@intel.com>
Date2016-01-31 13:20 +0100
Subject[PATCH v4 1/8] mm: Convert an open-coded VM_BUG_ON_VMA
Message-ID<qWZ90-38Q-13@gated-at.bofh.it>
From: Matthew Wilcox <willy@linux.intel.com>

Spotted during PUD support review.

Reported-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
---
 mm/memory.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index a2eaeef..324b40b 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1185,15 +1185,7 @@ static inline unsigned long zap_pmd_range(struct mmu_gather *tlb,
 		next = pmd_addr_end(addr, end);
 		if (pmd_trans_huge(*pmd) || pmd_devmap(*pmd)) {
 			if (next - addr != HPAGE_PMD_SIZE) {
-#ifdef CONFIG_DEBUG_VM
-				if (!rwsem_is_locked(&tlb->mm->mmap_sem)) {
-					pr_err("%s: mmap_sem is unlocked! addr=0x%lx end=0x%lx vma->vm_start=0x%lx vma->vm_end=0x%lx\n",
-						__func__, addr, end,
-						vma->vm_start,
-						vma->vm_end);
-					BUG();
-				}
-#endif
+				VM_BUG_ON_VMA(!rwsem_is_locked(&tlb->mm->mmap_sem), vma);
 				split_huge_pmd(vma, pmd, addr);
 			} else if (zap_huge_pmd(tlb, vma, pmd, addr))
 				goto next;
-- 
2.7.0.rc3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web