tech-net archive

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

Re: Locking question



Mindaugas Rasiukevicius <rmind%netbsd.org@localhost> writes:

> Mark Keaton <mkeaton%bbn.com@localhost> wrote:
>> So, I am wondering if anyone knows if this is a bug in the kernel (i.e., 
>> "softnet_lock" should have been locked before calling ip6_output())? 
>> Or, am I not understanding the real locking strategy used by these 
>> functions?
>
> It should be locked by softnet_lock.  Unfortunately, entry/exit paths into
> the stack (and different parts of the stack, like in your example) are not
> very well contained in this respect; softnet_lock is a big lock covering
> paths across multiple layers, so it is easy to end up with a problem like
> this.  The ultimate goal is to dismantle softnet_lock.

So should we be adding a comment to -current (and -6) about this, and
fixing the current lack of locking?  I understand that you're moving to
more fine-grained locking without softnet_lock, but it seems good to
make the current code reliable.

How about a commented-out KASSERT for now in ip6_output?

Attachment: pgpDa4_liaGxg.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index