tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: apparently missing locking in if_bnx.c

Manuel Bouyer <> writes:

>    KASSERT(curcpu()->ci_ilevel >= IPL_NET);
>    KASSERT(curcpu()->ci_biglock_count > 0);

I wonder if these should be present all the time.  They are individually
cheap checks, and thus qualify for DIAGNOSTIC, but I can see an argument
that having multiple KASSERTS per packet is too much.  Alternatively
they could be part of LOCKDEBUG, perhaps written differently.
It does seem that at some level of pararnoia >= DIAGNOSTIC and <=
LOCKDEBUG that invariants about locks held should be checked in as many
places as possible.

Attachment: pgpYY_sjDq2VD.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index