Subject: Re: race in net/ipv4/ipip.c ?

From: "David S. Miller" <[email-masked]>
Date: Wed, 12 Jan 2005 11:02:10 -0800

On Wed, 12 Jan 2005 14:21:26 +0100
Thomas Graf <[email-masked]> wrote:

> * YOSHIFUJI Hideaki / ?$B5HF#1QL@ <[email-masked]> 2005-01-12 22:08
> > How about adding multiple tunnels (with same ipip_bucket(t))
> > concurrently? :-)
> > 
> 
> * Lennert Buytenhek <[email-masked]> 2005-01-12 14:09
> > What if you add two tunnels at the same time?  (Or is that perhaps
> > synchronised on a higher level?)
> 
> Not possible, protected via rtnl semaphore acquired in default
> handler of dev_ioctl.

Yeah.  Alexey does this trick everywhere, when we have the RTNL semaphore
held we only need to lock for the actual linkage operation that adds the
new object to the tree.