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 (only commit message for rev 1.85, no actua...



details:   https://anonhg.NetBSD.org/src/rev/fa88c5262c35
branches:  trunk
changeset: 992265:fa88c5262c35
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Tue Aug 21 18:55:08 2018 +0000

description:
(only commit message for rev 1.85, no actual change)

shuffle code in xbd_handler() response loop so that req_bp is never
touched for non I/O responses; unknown commands are now just skipped, also
without touching neither xbdreq, nor req_bp

add some KASSERTS() for xbdreq->req_nr_segments and xbdreq->req_bp,
and reset req_bp after it's processed to ensure the buf can never
be processed twice

intended to simplify debugging in cases like PR port-xen/53506

diffstat:

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

diffs (26 lines):

diff -r af8ac247d7c5 -r fa88c5262c35 sys/arch/xen/xen/xbd_xenbus.c
--- a/sys/arch/xen/xen/xbd_xenbus.c     Tue Aug 21 18:45:16 2018 +0000
+++ b/sys/arch/xen/xen/xbd_xenbus.c     Tue Aug 21 18:55:08 2018 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xbd_xenbus.c,v 1.85 2018/08/21 18:45:16 jdolecek Exp $      */
+/*      $NetBSD: xbd_xenbus.c,v 1.86 2018/08/21 18:55:08 jdolecek Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.85 2018/08/21 18:45:16 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.86 2018/08/21 18:55:08 jdolecek Exp $");
 
 #include "opt_xen.h"
 
@@ -693,6 +693,7 @@
                KASSERT(xbdreq->req_nr_segments == 0);
 
                bp = xbdreq->req_bp;
+               KASSERT(bp != NULL);
                xbdreq->req_bp = NULL;
                DPRINTF(("%s(%p): b_bcount = %ld\n", __func__,
                    bp, (long)bp->b_bcount));



Home | Main Index | Thread Index | Old Index