cvs commit: src/sys/net if_gif.c if_gif.h src/sys/netinet in_gif.csrc/sys/netinet6 in6_gif.c

Andre Oppermann andre at freebsd.org
Mon Jan 30 02:52:00 PST 2006


Gleb Smirnoff wrote:
> 
> glebius     2006-01-30 08:39:09 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/net              if_gif.c if_gif.h
>     sys/netinet          in_gif.c
>     sys/netinet6         in6_gif.c
>   Log:
>   Add some initial locking to gif(4). It doesn't covers the whole driver,
>   however IPv4-in-IPv4 tunnels are now stable on SMP. Details:
> 
>   - Add per-softc mutex.
>   - Hold the mutex on output.
> 
>   The main problem was the rtentry, placed in softc. It could be
>   freed by ip_output(). Meanwhile, another thread being in
>   in_gif_output() can read and write this rtentry.

Caching the rtentry in gif(4) is evil anyway.  Just get rid of it(tm).

-- 
Andre


More information about the cvs-src mailing list