From 74676f87430fe7251413f11ea4190e940589acaa Mon Sep 17 00:00:00 2001 From: jdolecek Date: Wed, 28 Jul 2021 22:17:49 +0000 Subject: [PATCH] fix off-by-one check in another KASSERT() for bcount still related to PR port-xen/56328 --- sys/arch/xen/xen/xbdback_xenbus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arch/xen/xen/xbdback_xenbus.c b/sys/arch/xen/xen/xbdback_xenbus.c index f37a63add442..891b9465f0e3 100644 --- a/sys/arch/xen/xen/xbdback_xenbus.c +++ b/sys/arch/xen/xen/xbdback_xenbus.c @@ -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 -__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 #include @@ -1311,7 +1311,7 @@ xbdback_co_io_gotio(struct xbdback_instance *xbdi, void *obj) 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) {