diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2008-09-01 11:46:36 (GMT) |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-03 13:53:44 (GMT) |
commit | 5988b63a53e120a9db4439d4512f4c1b17e7170e (patch) | |
tree | cad229434f5f3f97205206de09ca6cb442b6da77 /drivers/net/sfc | |
parent | b9aafb0e91a079ff9438ce3c532ea46d4cd2f0fc (diff) | |
download | linux-5988b63a53e120a9db4439d4512f4c1b17e7170e.tar.xz |
sfc: Don't leak PCI DMA maps in the TSO code when the queue fills up
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r-- | drivers/net/sfc/tx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c index e5e0bab..0452ea6 100644 --- a/drivers/net/sfc/tx.c +++ b/drivers/net/sfc/tx.c @@ -1096,6 +1096,11 @@ static int efx_enqueue_skb_tso(struct efx_tx_queue *tx_queue, efx_stop_queue(tx_queue->efx); unwind: + /* Free the DMA mapping we were in the process of writing out */ + if (state.ifc.unmap_len) + pci_unmap_page(tx_queue->efx->pci_dev, state.ifc.unmap_addr, + state.ifc.unmap_len, PCI_DMA_TODEVICE); + efx_enqueue_unwind(tx_queue); return rc2; } |