Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/compat/netbsd32 Pull up following revision(s) (reques...
details: https://anonhg.NetBSD.org/src/rev/e7121be27a0b
branches: netbsd-6
changeset: 776658:e7121be27a0b
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Jun 30 12:09:40 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 b6701626bbd5 -r e7121be27a0b sys/compat/netbsd32/netbsd32_compat_50.c
--- a/sys/compat/netbsd32/netbsd32_compat_50.c Thu Jun 26 04:02:10 2014 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_50.c Mon Jun 30 12:09:40 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.6.1 2014/06/30 12:09:40 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.6.1 2014/06/30 12:09:40 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 b6701626bbd5 -r e7121be27a0b sys/compat/netbsd32/netbsd32_event.c
--- a/sys/compat/netbsd32/netbsd32_event.c Thu Jun 26 04:02:10 2014 +0000
+++ b/sys/compat/netbsd32/netbsd32_event.c Mon Jun 30 12:09:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_event.c,v 1.9.10.1 2014/03/18 08:01:34 msaitoh Exp $ */
+/* $NetBSD: netbsd32_event.c,v 1.9.10.2 2014/06/30 12:09:40 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.10.1 2014/03/18 08:01:34 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_event.c,v 1.9.10.2 2014/06/30 12:09:40 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