extern void mt_validate(struct maple_tree *mt);
extern void mt_dump(const struct maple_tree *mt);
-/* Validate the maple tree */
static void validate_mm(struct mm_struct *mm)
{
int bug = 0;
struct vm_area_struct *vma;
MA_STATE(mas, &mm->mm_mt, 0, 0);
-
+ mt_validate(&mm->mm_mt);
mas_for_each(&mas, vma, ULONG_MAX) {
+ VM_BUG_ON(mas.index != vma->vm_start);
+ VM_BUG_ON(mas.last != vma->vm_end - 1);
#ifdef CONFIG_DEBUG_VM_RB
struct anon_vma *anon_vma = vma->anon_vma;
struct anon_vma_chain *avc;
}
VM_BUG_ON_MM(bug, mm);
}
+
#else // !CONFIG_DEBUG_MAPLE_TREE
#define validate_mm(mm) do { } while (0)
#endif // CONFIG_DEBUG_MAPLE_TREE