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
On Tue, Mar 06, 2012 at 02:32:42PM -0500, Greg Troxel wrote:
>
> Manuel Bouyer <bouyer%antioche.eu.org@localhost> 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.
curcpu()->ci_ilevel is x86-specific, unfortunably ...
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index