summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/uipc_usrreq.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 4d47ed60567..e7bd6e4e331 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_usrreq.c,v 1.50 2011/04/04 12:44:10 deraadt Exp $ */
+/* $OpenBSD: uipc_usrreq.c,v 1.51 2011/05/17 00:17:01 guenther Exp $ */
/* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */
/*
@@ -777,6 +777,11 @@ morespace:
error = EDEADLK;
goto fail;
}
+ /* kq descriptors cannot be copied */
+ if (fp->f_type == DTYPE_KQUEUE) {
+ error = EINVAL;
+ goto fail;
+ }
bcopy(&fp, rp, sizeof fp);
rp--;
fp->f_count++;