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



Manuel Bouyer <bouyer%antioche.eu.org@localhost> wrote:
> 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.
> 

Who said anything about the whole IP stack?  We are talking about PCB
attach/detach only.  I have restored the original behaviour before my
recent change.

-- 
Mindaugas


Home | Main Index | Thread Index | Old Index