diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-03-04 19:43:19 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-03-04 19:43:19 +0000 |
commit | 800049910c1f0a880ad4eb19a649850bf3a0c94e (patch) | |
tree | 8be2ef52bf822dd07b0efbafa04633812c5e186c | |
parent | e4f659541709ebdcc9231f547a36b4600f51ea17 (diff) |
Add a workaround against a NULL pointer dereference on alpha when
invoking bus_dmaamp_sync, until the cause of the problem is found.
ok deraadt@
-rw-r--r-- | sys/dev/pci/if_de.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c index cac5e4bfb93..4958a4a33af 100644 --- a/sys/dev/pci/if_de.c +++ b/sys/dev/pci/if_de.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_de.c,v 1.98 2007/09/19 02:32:57 brad Exp $ */ +/* $OpenBSD: if_de.c,v 1.99 2008/03/04 19:43:18 miod Exp $ */ /* $NetBSD: if_de.c,v 1.58 1998/01/12 09:39:58 thorpej Exp $ */ /*- @@ -3242,6 +3242,9 @@ tulip_rx_intr(tulip_softc_t * const sc) IF_DEQUEUE(&sc->tulip_rxq, ms); for (me = ms; total_len > 0; total_len--) { map = TULIP_GETCTX(me, bus_dmamap_t); +#ifdef __alpha__ + if (map->_dm_window != NULL) +#endif TULIP_RXMAP_POSTSYNC(sc, map); bus_dmamap_unload(sc->tulip_dmatag, map); sc->tulip_rxmaps[sc->tulip_rxmaps_free++] = map; @@ -3490,6 +3493,9 @@ tulip_tx_intr(tulip_softc_t * const sc) IF_DEQUEUE(&sc->tulip_txq, m); if (m != NULL) { bus_dmamap_t map = TULIP_GETCTX(m, bus_dmamap_t); +#ifdef __alpha__ + if (map->_dm_window != NULL) +#endif TULIP_TXMAP_POSTSYNC(sc, map); sc->tulip_txmaps[sc->tulip_txmaps_free++] = map; #if NBPFILTER > 0 |