Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Add an assertion.



details:   https://anonhg.NetBSD.org/src/rev/9e9a8feb841d
branches:  trunk
changeset: 1008062:9e9a8feb841d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Mar 09 01:55:16 2020 +0000

description:
Add an assertion.

diffstat:

 sys/dev/pci/if_txp.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r aadee99c27ec -r 9e9a8feb841d sys/dev/pci/if_txp.c
--- a/sys/dev/pci/if_txp.c      Mon Mar 09 01:54:31 2020 +0000
+++ b/sys/dev/pci/if_txp.c      Mon Mar 09 01:55:16 2020 +0000
@@ -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 @@
                }
 
                /* 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,



Home | Main Index | Thread Index | Old Index