Add a "safety belt" check for lsb setting.

I don't think it is really necessary because the cpumask is known to be
!= 0, but it is just in case.

Requested by:	kib
This commit is contained in:
attilio 2011-05-22 20:24:36 +00:00
parent 58bd8f5197
commit 750009665b
2 changed files with 2 additions and 0 deletions

View File

@ -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);

View File

@ -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);