(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/53506diff -r1.85 -r1.86 src/sys/arch/xen/xen/xbd_xenbus.c
(jdolecek)
--- src/sys/arch/xen/xen/xbd_xenbus.c 2018/08/21 18:45:16 1.85
+++ src/sys/arch/xen/xen/xbd_xenbus.c 2018/08/21 18:55:08 1.86
@@ -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));