Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6-0]: src/sys/compat/netbsd32 Pull up following revision(s) (requ...
details: https://anonhg.NetBSD.org/src/rev/248be0e28bbe
branches: netbsd-6-0
changeset: 774957:248be0e28bbe
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Jun 30 12:10:25 2014 +0000
description:
Pull up following revision(s) (requested by maxv in ticket #1090):
sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.24
sys/compat/netbsd32/netbsd32_event.c: revision 1.11
Allocate directly KQ_NEVENTS bytes. Otherwise a user can panic the system.
ok christos@
diffstat:
sys/compat/netbsd32/netbsd32_compat_50.c | 7 ++++---
sys/compat/netbsd32/netbsd32_event.c | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
diffs (56 lines):
diff -r 15a81fb67d4d -r 248be0e28bbe sys/compat/netbsd32/netbsd32_compat_50.c
--- a/sys/compat/netbsd32/netbsd32_compat_50.c Mon Jun 30 04:38:18 2014 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_50.c Mon Jun 30 12:10:25 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_compat_50.c,v 1.20 2011/11/18 03:34:13 christos Exp $ */
+/* $NetBSD: netbsd32_compat_50.c,v 1.20.12.1 2014/06/30 12:10:25 msaitoh Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.20 2011/11/18 03:34:13 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.20.12.1 2014/06/30 12:10:25 msaitoh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@@ -631,7 +631,8 @@
nchanges = SCARG(uap, nchanges);
nevents = SCARG(uap, nevents);
- maxalloc = MIN(KQ_NEVENTS, MAX(nchanges, nevents));
+ maxalloc = KQ_NEVENTS;
+
netbsd32_kevent_ops.keo_private =
kmem_alloc(maxalloc * sizeof(struct netbsd32_kevent), KM_SLEEP);
diff -r 15a81fb67d4d -r 248be0e28bbe sys/compat/netbsd32/netbsd32_event.c
--- a/sys/compat/netbsd32/netbsd32_event.c Mon Jun 30 04:38:18 2014 +0000
+++ b/sys/compat/netbsd32/netbsd32_event.c Mon Jun 30 12:10:25 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_event.c,v 1.9 2011/05/23 21:34:47 joerg Exp $ */
+/* $NetBSD: netbsd32_event.c,v 1.9.16.1 2014/06/30 12:10:25 msaitoh Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_event.c,v 1.9 2011/05/23 21:34:47 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_event.c,v 1.9.16.1 2014/06/30 12:10:25 msaitoh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -112,7 +112,8 @@
nchanges = SCARG(uap, nchanges);
nevents = SCARG(uap, nevents);
- maxalloc = MIN(KQ_NEVENTS, MAX(nchanges, nevents));
+ maxalloc = KQ_NEVENTS;
+
netbsd32_kevent_ops.keo_private =
kmem_alloc(maxalloc * sizeof(struct netbsd32_kevent), KM_SLEEP);
Home |
Main Index |
Thread Index |
Old Index