tech-net archive

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

Re: missing KERNEL_LOCK ?

On Wed, Apr 09, 2014 at 05:11:51PM +0200, Manuel Bouyer wrote:
> [...]
> The attached patch does 2 things.
> The first one is to add KASSERT(KERNEL_LOCKED_P()) at strategic places,
> where we're about to touch the output queues. This is because the
> output queues are protected by spl() calls only, so the kernel lock
> must be held to protect them.
> As the KASSERT() did fire, I then added KERNEL_LOCK()/UNLOCK() where needed.
> I found that ifp_ouput() was being called without KERNEL_LOCK() from
> ipf(4), and carp(4) so far.
> I'm now running with this patch for 2 days without apparent problem, and
> the leak didn't show up (but it's too soon to say if the issue is
> fixed or not).
> So, 2 questions:
> - is my analysis right ?
> - if so, should I commit the patch as is ?

I've still not had any problem with this patch. I've now also tested a 
LOCKDEBUG kernel, without problem either.
So, unless someone objects, I'll commit it in the next few days.

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index