mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-13 21:02:35 +00:00
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: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
993a82b0ff
commit
59af56c25b
@ -193,9 +193,9 @@ static void free_long_term_buff(struct ibmvnic_adapter *adapter,
|
||||
if (!ltb->buff)
|
||||
return;
|
||||
|
||||
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user