diff --git a/sys/kern/subr_vmem.c b/sys/kern/subr_vmem.c index 3a7f4f9c8d31..0c8421d9d824 100644 --- a/sys/kern/subr_vmem.c +++ b/sys/kern/subr_vmem.c @@ -1738,10 +1738,20 @@ vmem_check_sanity(vmem_t *vm) } } TAILQ_FOREACH(bt, &vm->vm_seglist, bt_seglist) { + if (bt->bt_type == BT_TYPE_CURSOR) { + if (bt->bt_start != 0 || bt->bt_size != 0) { + printf("corrupted cursor\n"); + return false; + } + continue; + } TAILQ_FOREACH(bt2, &vm->vm_seglist, bt_seglist) { if (bt == bt2) { continue; } + if (bt2->bt_type == BT_TYPE_CURSOR) { + continue; + } if (BT_ISSPAN_P(bt) != BT_ISSPAN_P(bt2)) { continue; }