Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/xen fix off-by-one check in another KASSERT() f...



details:   https://anonhg.NetBSD.org/src/rev/3bcdfd58b509
branches:  trunk
changeset: 984895:3bcdfd58b509
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Wed Jul 28 22:17:49 2021 +0000

description:
fix off-by-one check in another KASSERT() for bcount

still related to PR port-xen/56328

diffstat:

 sys/arch/xen/xen/xbdback_xenbus.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 3a1d12586a7a -r 3bcdfd58b509 sys/arch/xen/xen/xbdback_xenbus.c
--- a/sys/arch/xen/xen/xbdback_xenbus.c Wed Jul 28 21:38:50 2021 +0000
+++ b/sys/arch/xen/xen/xbdback_xenbus.c Wed Jul 28 22:17:49 2021 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xbdback_xenbus.c,v 1.98 2021/07/28 21:38:50 jdolecek Exp $      */
+/*      $NetBSD: xbdback_xenbus.c,v 1.99 2021/07/28 22:17:49 jdolecek Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.98 2021/07/28 21:38:50 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.99 2021/07/28 22:17:49 jdolecek Exp $");
 
 #include <sys/buf.h>
 #include <sys/condvar.h>
@@ -1311,7 +1311,7 @@
 
        KASSERT(bcount <= MAXPHYS);
        KASSERT(xbd_io->xio_start_offset < PAGE_SIZE);
-       KASSERT(bcount + xbd_io->xio_start_offset < VBD_VA_SIZE);
+       KASSERT(bcount + xbd_io->xio_start_offset <= VBD_VA_SIZE);
 
        /* Fill-in the buf */
        if (xbdi->xbdi_xen_req.operation == BLKIF_OP_WRITE) {



Home | Main Index | Thread Index | Old Index