Skip to content

Commit b9bd25f

Browse files
aloktiwakuba-moo
authored andcommitted
idpf: fix mismatched free function for dma_alloc_coherent
The mailbox receive path allocates coherent DMA memory with dma_alloc_coherent(), but frees it with dmam_free_coherent(). This is incorrect since dmam_free_coherent() is only valid for buffers allocated with dmam_alloc_coherent(). Fix the mismatch by using dma_free_coherent() instead of dmam_free_coherent Fixes: e54232d ("idpf: refactor idpf_recv_mb_msg") Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Madhu Chittim <madhu.chittim@intel.com> Link: https://patch.msgid.link/20250925180212.415093-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 012ea48 commit b9bd25f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/net/ethernet/intel/idpf/idpf_virtchnl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -702,9 +702,9 @@ int idpf_recv_mb_msg(struct idpf_adapter *adapter)
702702
/* If post failed clear the only buffer we supplied */
703703
if (post_err) {
704704
if (dma_mem)
705-
dmam_free_coherent(&adapter->pdev->dev,
706-
dma_mem->size, dma_mem->va,
707-
dma_mem->pa);
705+
dma_free_coherent(&adapter->pdev->dev,
706+
dma_mem->size, dma_mem->va,
707+
dma_mem->pa);
708708
break;
709709
}
710710

0 commit comments

Comments
 (0)