Current-Users archive

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

Re: KASSERT "KERNEL_LOCKED_P()" failed (if_ethersubr.c:214) when stopping rpcbind



On Tue, May 20, 2014 at 08:04:23PM +0100, Mindaugas Rasiukevicius wrote:
> Nicolas Joly <njoly%pasteur.fr@localhost> wrote:
> > 
> > njoly@lanfeust [/misc/crash]> crash -M netbsd.17.core -N netbsd.17
> > Crash version 6.99.42,image version 6.99.42.
> > System panicked: kernel diagnostic assertion "KERNEL_LOCKED_P()"failed:
> > file "/local/src/NetBSD/src/sys/net/if_ethersubr.c", line 214 Backtrace
> > from time of crash is available.
> 
> Fixed.  We may start pushing the kernel-lock to the entry points of various
> subsystems (like Ethernet, in this case), but wrapping attach/detach is more
> defensive way for now.

the IP stack is not supported to run under KERNEL_LOCK
(and actually is not, because ip_input() is explicitely called without
the KERNEL_LOCK held.
The ethernet subsystem (and probably other link-layer subsystems)
still needs the kernel lock, so grabing is again before sending a packet is
the way to go (and is what IP is doing). This is why I added this KASSERT().

Running the whole IP stack under KERNEL_LOCK would be a regression.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index