Module Name:    src
Committed By:   thorpej
Date:           Mon Mar  9 01:55:16 UTC 2020

Modified Files:
        src/sys/dev/pci: if_txp.c

Log Message:
Add an assertion.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/pci/if_txp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_txp.c
diff -u src/sys/dev/pci/if_txp.c:1.70 src/sys/dev/pci/if_txp.c:1.71
--- src/sys/dev/pci/if_txp.c:1.70	Mon Mar  9 01:53:11 2020
+++ src/sys/dev/pci/if_txp.c	Mon Mar  9 01:55:16 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: if_txp.c,v 1.70 2020/03/09 01:53:11 thorpej Exp $ */
+/* $NetBSD: if_txp.c,v 1.71 2020/03/09 01:55:16 thorpej Exp $ */
 
 /*
  * Copyright (c) 2001
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.70 2020/03/09 01:53:11 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.71 2020/03/09 01:55:16 thorpej Exp $");
 
 #include "opt_inet.h"
 
@@ -716,6 +716,7 @@ txp_rx_reclaim(struct txp_softc *sc, str
 		}
 
 		/* retrieve stashed pointer */
+		KASSERT(rxd->rx_vaddrlo < RXBUF_ENTRIES);
 		sd = &sc->sc_rxd[rxd->rx_vaddrlo];
 
 		bus_dmamap_sync(sc->sc_dmat, sd->sd_map, 0,

Reply via email to