Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6-1]: src/sys/arch/xen/xen Pull up following revision(s) (request...



details:   https://anonhg.NetBSD.org/src/rev/d704db2b79cf
branches:  netbsd-6-1
changeset: 776076:d704db2b79cf
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Wed May 27 05:56:42 2015 +0000

description:
Pull up following revision(s) (requested by bouyer in ticket #1299):
        sys/arch/xen/xen/xenevt.c: revision 1.42
Fix off by one error, pointed out by Wei Liu in port-xen/49919

diffstat:

 sys/arch/xen/xen/xenevt.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r f616bcb39c0c -r d704db2b79cf sys/arch/xen/xen/xenevt.c
--- a/sys/arch/xen/xen/xenevt.c Sat May 02 17:08:07 2015 +0000
+++ b/sys/arch/xen/xen/xenevt.c Wed May 27 05:56:42 2015 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xenevt.c,v 1.39 2011/12/03 22:41:40 bouyer Exp $      */
+/*      $NetBSD: xenevt.c,v 1.39.18.1 2015/05/27 05:56:42 msaitoh Exp $      */
 
 /*
  * Copyright (c) 2005 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xenevt.c,v 1.39 2011/12/03 22:41:40 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xenevt.c,v 1.39.18.1 2015/05/27 05:56:42 msaitoh Exp $");
 
 #include "opt_xen.h"
 #include <sys/param.h>
@@ -479,7 +479,7 @@
        if (uio->uio_resid == 0)
                return (0);
        nentries = uio->uio_resid / sizeof(uint16_t);
-       if (nentries > NR_EVENT_CHANNELS)
+       if (nentries >= NR_EVENT_CHANNELS)
                return EMSGSIZE;
        chans = kmem_alloc(nentries * sizeof(uint16_t), KM_SLEEP);
        if (chans == NULL)
@@ -572,7 +572,7 @@
        {
                struct ioctl_evtchn_unbind *unbind = addr;
                
-               if (unbind->port > NR_EVENT_CHANNELS)
+               if (unbind->port >= NR_EVENT_CHANNELS)
                        return EINVAL;
                mutex_enter(&devevent_lock);
                if (devevent[unbind->port] != d) {
@@ -593,7 +593,7 @@
        {
                struct ioctl_evtchn_notify *notify = addr;
                
-               if (notify->port > NR_EVENT_CHANNELS)
+               if (notify->port >= NR_EVENT_CHANNELS)
                        return EINVAL;
                mutex_enter(&devevent_lock);
                if (devevent[notify->port] != d) {



Home | Main Index | Thread Index | Old Index