Hello Liam, On (23/06/12 16:39), Liam R. Howlett wrote: [..] > @@ -2450,17 +2452,17 @@ do_vmi_align_munmap(struct vma_iterator *vmi, struct vm_area_struct *vma, > #if defined(CONFIG_DEBUG_VM_MAPLE_TREE) > /* Make sure no VMAs are about to be lost. */ > { > - MA_STATE(test, &mt_detach, start, end - 1); > + MA_STATE(test, &mt_detach, 0, 0); > struct vm_area_struct *vma_mas, *vma_test; > int test_count = 0; > > vma_iter_set(vmi, start); > rcu_read_lock(); > - vma_test = mas_find(&test, end - 1); > + vma_test = mas_find(&test, count - 1); > for_each_vma_range(*vmi, vma_mas, end) { > BUG_ON(vma_mas != vma_test); > test_count++; > - vma_test = mas_next(&test, end - 1); > + vma_test = mas_next(&test, count - 1); > } > rcu_read_unlock(); > BUG_ON(count != test_count); Something isn't quite working, I'm hitting BUG_ON(vma_mas != vma_test) [ 8.156437] ------------[ cut here ]------------ [ 8.160473] kernel BUG at mm/mmap.c:2439! [ 8.163894] invalid opcode: 0000 [#1] PREEMPT SMP PTI RIP: 0010:do_vmi_align_munmap+0x489/0x8a0 [ 8.207867] Call Trace: [ 8.208463] <TASK> [ 8.209018] ? die+0x32/0x80 [ 8.209709] ? do_trap+0xd2/0x100 [ 8.210520] ? do_vmi_align_munmap+0x489/0x8a0 [ 8.211576] ? do_vmi_align_munmap+0x489/0x8a0 [ 8.212639] ? do_error_trap+0x94/0x110 [ 8.213549] ? do_vmi_align_munmap+0x489/0x8a0 [ 8.214581] ? exc_invalid_op+0x49/0x60 [ 8.215494] ? do_vmi_align_munmap+0x489/0x8a0 [ 8.216576] ? asm_exc_invalid_op+0x16/0x20 [ 8.217562] ? do_vmi_align_munmap+0x489/0x8a0 [ 8.218626] do_vmi_munmap+0xc7/0x120 [ 8.219494] __vm_munmap+0xaa/0x1c0 [ 8.220370] __x64_sys_munmap+0x17/0x20 [ 8.221275] do_syscall_64+0x34/0x80 [ 8.222165] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 8.223359] RIP: 0033:0x7fdb0e2fca97 [ 8.224224] Code: ff ff ff ff c3 66 0f 1f 44 00 00 f7 d8 89 05 20 28 01 00 48 c7 c0 ff ff ff ff c3 0f 1f 84 00 00 00 00 00 b8 0b 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8d 0d f9 27 01 00 f7 d8 89 01 48 83 [ 8.228432] RSP: 002b:00007ffd15458348 EFLAGS: 00000202 ORIG_RAX: 000000000000000b [ 8.230175] RAX: ffffffffffffffda RBX: 0000562081a347b0 RCX: 00007fdb0e2fca97 [ 8.231833] RDX: 0000000000000002 RSI: 0000000000004010 RDI: 00007fdb0e2d5000 [ 8.233513] RBP: 00007ffd154584d0 R08: 0000000000000000 R09: 0000562081a3fd30 [ 8.235178] R10: 0000562081a3fd18 R11: 0000000000000202 R12: 00007ffd15458388 [ 8.236861] R13: 00007ffd15458438 R14: 00007ffd15458370 R15: 0000562081a347b0