Subject: Re: Locking trouble in net/if_tun.c
To: Tom Ivar Helbekkmo <tih@eunetnorge.no>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: tech-net
Date: 05/09/2004 22:33:46
>  [...]
> The ENOBUFS is supposed to indicate a transient error.  Note that I've
> kept the unlock in the collision case, because I still believe it's
> supposed to be there -- but I may be wrong.  Anyway, after this
> change, my VPN tunnel works great, there are no hangs, and I do not
> see any degradation in performance.
> 
> Anyone care to look this over, and try to understand whether I've done
> the right thing, or just masked the symptoms of another problem?  :-)

The lock is used in interrupt context. Therefore, it should be protected
by raising the interrupt priority level while holding it (splnet() in
this case), which seems to be categorically missing in this driver.

-pk