Current-Users archive

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

Re: Hard hang in current when starting openvpn



On Thu, Nov 20, 2008 at 11:21:02AM -0700, Sverre Froyen wrote:
> > On Tuesday 18 November 2008, Sverre Froyen wrote:
> ...
> > > With today's current, I get a hang when attempting to start openvpn in
> > > the boot sequence (from pkgsrc).   The ctr-alt-esc key press does
> > > nothing.
> 
> The problem started after the commit
> 
> http://mail-index.netbsd.org/source-changes/2008/11/07/msg212329.html
> 
> I have file a PR: kern/39979

I have attached a patch for you to apply to sys/net/if_tun.c.

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933 ext 24
Index: if_tun.c
===================================================================
RCS file: /cvsroot/src/sys/net/if_tun.c,v
retrieving revision 1.108
diff -p -u -u -p -r1.108 if_tun.c
--- if_tun.c    7 Nov 2008 00:20:13 -0000       1.108
+++ if_tun.c    20 Nov 2008 20:07:30 -0000
@@ -388,6 +388,7 @@ tuninit(struct tun_softc *tp)
 
        TUNDEBUG("%s: tuninit\n", ifp->if_xname);
 
+       simple_lock(&tp->tun_lock);
        ifp->if_flags |= IFF_UP | IFF_RUNNING;
 
        tp->tun_flags &= ~(TUN_IASET|TUN_DSTADDR);
@@ -426,6 +427,7 @@ tuninit(struct tun_softc *tp)
 #endif /* INET6 */
        }
 
+       simple_unlock(&tp->tun_lock);
        return;
 }
 
@@ -440,7 +442,6 @@ tun_ioctl(struct ifnet *ifp, u_long cmd,
        struct ifreq *ifr = data;
 
        s = splnet();
-       simple_lock(&tp->tun_lock);
 
        switch (cmd) {
        case SIOCINITIFADDR:
@@ -487,7 +488,6 @@ tun_ioctl(struct ifnet *ifp, u_long cmd,
                error = ifioctl_common(ifp, cmd, data);
        }
 
-       simple_unlock(&tp->tun_lock);
        splx(s);
        return (error);
 }


Home | Main Index | Thread Index | Old Index