diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index d0699b5311a9..a09138cb2567 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -1947,6 +1947,7 @@ pmap_lazyfix(pmap_t pmap) /* Find least significant set bit. */ lsb = cpusetobj_ffs(&mask); + MPASS(lsb != 0); lsb--; CPU_SETOF(lsb, &mask); mtx_lock_spin(&smp_ipi_mtx); diff --git a/sys/i386/xen/pmap.c b/sys/i386/xen/pmap.c index 1149b6f516c4..2f3953884ab1 100644 --- a/sys/i386/xen/pmap.c +++ b/sys/i386/xen/pmap.c @@ -1730,6 +1730,7 @@ pmap_lazyfix(pmap_t pmap) /* Find least significant set bit. */ lsb = cpusetobj_ffs(&mask); + MPASS(lsb != 0); lsb--; CPU_SETOF(lsb, &mask); mtx_lock_spin(&smp_ipi_mtx);