summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-12-31 01:22:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-12-31 01:22:56 +0000
commit19a8a6653ad62342aa48befbc1f4515ffd98355d (patch)
treef01336c26937a4f95ebf0e81cbd5d9508b5f6be9 /sys/net
parent4ba726044a9cf6e9ec84f0d00f00b5f179805a5e (diff)
two missing splx(); one from brian, one from me
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_tun.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index f5e7cdff9ff..525168008dc 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tun.c,v 1.20 1997/08/31 20:42:32 deraadt Exp $ */
+/* $OpenBSD: if_tun.c,v 1.21 1997/12/31 01:22:55 deraadt Exp $ */
/* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */
/*
@@ -492,9 +492,11 @@ tunread(dev, uio, ioflag)
s = splimp();
do {
while ((tp->tun_flags & TUN_READY) != TUN_READY)
- if (tsleep((caddr_t)tp, (PZERO+1)|PCATCH, "tunread", 0) != 0)
+ if (tsleep((caddr_t)tp, (PZERO+1)|PCATCH,
+ "tunread", 0) != 0) {
+ splx(s);
return(EINTR);
-
+ }
IF_DEQUEUE(&ifp->if_snd, m0);
if (m0 == 0) {
if (tp->tun_flags & TUN_NBIO && ioflag & IO_NDELAY) {
@@ -502,8 +504,11 @@ tunread(dev, uio, ioflag)
return EWOULDBLOCK;
}
tp->tun_flags |= TUN_RWAIT;
- if (tsleep((caddr_t)tp, (PZERO + 1)|PCATCH, "tunread", 0) != 0)
+ if (tsleep((caddr_t)tp, (PZERO + 1)|PCATCH,
+ "tunread", 0) != 0) {
+ splx(s);
return EINTR;
+ }
}
} while (m0 == 0);
splx(s);