aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mmap.c
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2014-10-09 18:28:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-09 22:25:58 -0400
commit96dad67ff244e797c4bc3e4f7f0fdaa0cfdf0a7d (patch)
treeea45352bf168845bf42d0d656b5d8bdacc55d8e8 /mm/mmap.c
parent31c9afa6db122a5c7a7843278aaf77dd08ea6e98 (diff)
mm: use VM_BUG_ON_MM where possible
Dump the contents of the relevant struct_mm when we hit the bug condition. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mmap.c')
-rw-r--r--mm/mmap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index c9bc285df255..16d19b48e2ad 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -410,8 +410,9 @@ static void validate_mm_rb(struct rb_root *root, struct vm_area_struct *ignore)
410 for (nd = rb_first(root); nd; nd = rb_next(nd)) { 410 for (nd = rb_first(root); nd; nd = rb_next(nd)) {
411 struct vm_area_struct *vma; 411 struct vm_area_struct *vma;
412 vma = rb_entry(nd, struct vm_area_struct, vm_rb); 412 vma = rb_entry(nd, struct vm_area_struct, vm_rb);
413 BUG_ON(vma != ignore && 413 VM_BUG_ON_VMA(vma != ignore &&
414 vma->rb_subtree_gap != vma_compute_subtree_gap(vma)); 414 vma->rb_subtree_gap != vma_compute_subtree_gap(vma),
415 vma);
415 } 416 }
416} 417}
417 418
@@ -448,7 +449,7 @@ static void validate_mm(struct mm_struct *mm)
448 pr_emerg("map_count %d rb %d\n", mm->map_count, i); 449 pr_emerg("map_count %d rb %d\n", mm->map_count, i);
449 bug = 1; 450 bug = 1;
450 } 451 }
451 BUG_ON(bug); 452 VM_BUG_ON_MM(bug, mm);
452} 453}
453#else 454#else
454#define validate_mm_rb(root, ignore) do { } while (0) 455#define validate_mm_rb(root, ignore) do { } while (0)