Module Name: src
Committed By: christos
Date: Sat Nov 24 15:07:44 UTC 2012
Modified Files:
src/sys/kern: kern_descrip.c
Log Message:
Return EOPNOTSUPP for fnullop_kqfilter to prevent registration of unsupported
fds. XXX: We should really fix the fd's to be supported in the future.
Unsupported fd's have a NULL f_event, so registering crashes the kernel with
a NULL function dereference of f_event.
To generate a diff of this commit:
cvs rdiff -u -r1.218 -r1.219 src/sys/kern/kern_descrip.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/kern_descrip.c
diff -u src/sys/kern/kern_descrip.c:1.218 src/sys/kern/kern_descrip.c:1.219
--- src/sys/kern/kern_descrip.c:1.218 Tue Jan 24 19:28:35 2012
+++ src/sys/kern/kern_descrip.c Sat Nov 24 10:07:44 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_descrip.c,v 1.218 2012/01/25 00:28:35 christos Exp $ */
+/* $NetBSD: kern_descrip.c,v 1.219 2012/11/24 15:07:44 christos Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.218 2012/01/25 00:28:35 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.219 2012/11/24 15:07:44 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1885,7 +1885,7 @@ int
fnullop_kqfilter(file_t *fp, struct knote *kn)
{
- return 0;
+ return EOPNOTSUPP;
}
void