Commit 59af56c2 authored by Brian King's avatar Brian King Committed by David S. Miller
Browse files

ibmvnic: Unmap longer term buffer before free

Make sure we unregister long term buffers from the adapter
prior to DMA unmapping it and freeing the buffer. Failure
to do so could result in a DMA to a now invalid address.

Signed-off-by: default avatarBrian King <>
Signed-off-by: default avatarNathan Fontenot <>
Signed-off-by: default avatarDavid S. Miller <>
parent 993a82b0
......@@ -193,9 +193,9 @@ static void free_long_term_buff(struct ibmvnic_adapter *adapter,
if (!ltb->buff)
dma_free_coherent(dev, ltb->size, ltb->buff, ltb->addr);
if (!adapter->failover)
send_request_unmap(adapter, ltb->map_id);
dma_free_coherent(dev, ltb->size, ltb->buff, ltb->addr);
static void replenish_rx_pool(struct ibmvnic_adapter *adapter,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment