Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/kern Pull up following revision(s) (requested by mart...
details: https://anonhg.NetBSD.org/src/rev/6db13e4f6a9d
branches: netbsd-6
changeset: 774186:6db13e4f6a9d
user: riz <riz%NetBSD.org@localhost>
date: Mon Jun 11 23:20:38 2012 +0000
description:
Pull up following revision(s) (requested by martin in ticket #304):
sys/kern/uipc_usrreq.c: revision 1.137
Stopgap fix for PR kern/46463: disallow passing of kqueue descriptors
via SCM_RIGHT anxiliary socket messages.
diffstat:
sys/kern/uipc_usrreq.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r e515fd82f4ca -r 6db13e4f6a9d sys/kern/uipc_usrreq.c
--- a/sys/kern/uipc_usrreq.c Mon Jun 11 23:15:38 2012 +0000
+++ b/sys/kern/uipc_usrreq.c Mon Jun 11 23:20:38 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_usrreq.c,v 1.136 2011/06/26 16:42:43 christos Exp $ */
+/* $NetBSD: uipc_usrreq.c,v 1.136.8.1 2012/06/11 23:20:38 riz Exp $ */
/*-
* Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.136 2011/06/26 16:42:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.136.8.1 2012/06/11 23:20:38 riz Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1382,7 +1382,10 @@
error = EAGAIN;
goto out;
}
- if ((fp = fd_getfile(fd)) == NULL) {
+ if ((fp = fd_getfile(fd)) == NULL
+ || fp->f_type == DTYPE_KQUEUE) {
+ if (fp)
+ fd_putfile(fd);
atomic_dec_uint(&unp_rights);
nfds = i;
error = EBADF;
Home |
Main Index |
Thread Index |
Old Index