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 KASSERT() in xbd_map_align()



details:   https://anonhg.NetBSD.org/src/rev/5dbb3ae069b7
branches:  trunk
changeset: 1009169:5dbb3ae069b7
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Tue Apr 14 15:16:06 2020 +0000

description:
fix KASSERT() in xbd_map_align()

diffstat:

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

diffs (27 lines):

diff -r 6af192eb9d71 -r 5dbb3ae069b7 sys/arch/xen/xen/xbd_xenbus.c
--- a/sys/arch/xen/xen/xbd_xenbus.c     Tue Apr 14 14:06:24 2020 +0000
+++ b/sys/arch/xen/xen/xbd_xenbus.c     Tue Apr 14 15:16:06 2020 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xbd_xenbus.c,v 1.112 2020/04/14 14:06:24 jdolecek Exp $      */
+/*      $NetBSD: xbd_xenbus.c,v 1.113 2020/04/14 15:16:06 jdolecek Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.112 2020/04/14 14:06:24 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.113 2020/04/14 15:16:06 jdolecek Exp $");
 
 #include "opt_xen.h"
 
@@ -1132,7 +1132,7 @@
        }
        sc->sc_unalign_free = false;
 
-       KASSERT(req->req_bp->b_bcount < MAXPHYS);
+       KASSERT(req->req_bp->b_bcount <= MAXPHYS);
        req->req_data = (void *)sc->sc_unalign_buffer;
        if ((req->req_bp->b_flags & B_READ) == 0)
                memcpy(req->req_data, req->req_bp->b_data,



Home | Main Index | Thread Index | Old Index