summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tun.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_tun.c')
-rw-r--r--sys/net/if_tun.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 3b0d98e..9518c31 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -479,7 +479,11 @@ tunread(dev_t dev, struct uio *uio, int flag)
return EWOULDBLOCK;
}
tp->tun_flags |= TUN_RWAIT;
- tsleep((caddr_t)tp, PZERO + 1, "tunread", 0);
+ if( error = tsleep((caddr_t)tp, PCATCH | (PZERO + 1),
+ "tunread", 0)) {
+ splx(s);
+ return error;
+ }
}
} while (m0 == 0);
splx(s);
OpenPOWER on IntegriCloud