diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2009-06-28 22:05:37 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2009-06-28 22:05:37 +0000 |
commit | 42b7ff80c1377fb5b4a9f81ab583d60399947c39 (patch) | |
tree | 44fae1039c399d7fa3c8eba7769f19d3cad300dc /sys | |
parent | e7fb2ae9ba6f575910d98efc82123b3232305f35 (diff) |
Properly swap tx dma maps so we don't use invalid maps,
leak memory, lose maps or cause double frees.
Problem courtesy of our good friends at Intel in the original
FreeBSD driver.
"awesome" dlg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_ix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c index c973db0215a..ca9129b5637 100644 --- a/sys/dev/pci/if_ix.c +++ b/sys/dev/pci/if_ix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ix.c,v 1.20 2009/06/25 17:01:32 deraadt Exp $ */ +/* $OpenBSD: if_ix.c,v 1.21 2009/06/28 22:05:36 jsg Exp $ */ /****************************************************************************** @@ -930,6 +930,7 @@ ixgbe_encap(struct tx_ring *txr, struct mbuf *m_head) txr->next_avail_tx_desc = i; txbuf->m_head = m_head; + txbuf_mapped->map = txbuf->map; txbuf->map = map; bus_dmamap_sync(txr->txtag, map, 0, map->dm_mapsize, BUS_DMASYNC_PREWRITE); |