提交 5988b63a 编写于 作者: B Ben Hutchings 提交者: Jeff Garzik

sfc: Don't leak PCI DMA maps in the TSO code when the queue fills up

Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 b9aafb0e
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册