@@ -600,7 +600,7 @@ dmabuf_imp_to_refs(struct gntdev_dmabuf_priv *priv, struct device *dev,
600
600
601
601
gntdev_dmabuf -> u .imp .attach = attach ;
602
602
603
- sgt = dma_buf_map_attachment (attach , DMA_BIDIRECTIONAL );
603
+ sgt = dma_buf_map_attachment_unlocked (attach , DMA_BIDIRECTIONAL );
604
604
if (IS_ERR (sgt )) {
605
605
ret = ERR_CAST (sgt );
606
606
goto fail_detach ;
@@ -658,7 +658,7 @@ dmabuf_imp_to_refs(struct gntdev_dmabuf_priv *priv, struct device *dev,
658
658
fail_end_access :
659
659
dmabuf_imp_end_foreign_access (gntdev_dmabuf -> u .imp .refs , count );
660
660
fail_unmap :
661
- dma_buf_unmap_attachment (attach , sgt , DMA_BIDIRECTIONAL );
661
+ dma_buf_unmap_attachment_unlocked (attach , sgt , DMA_BIDIRECTIONAL );
662
662
fail_detach :
663
663
dma_buf_detach (dma_buf , attach );
664
664
fail_free_obj :
@@ -708,8 +708,8 @@ static int dmabuf_imp_release(struct gntdev_dmabuf_priv *priv, u32 fd)
708
708
attach = gntdev_dmabuf -> u .imp .attach ;
709
709
710
710
if (gntdev_dmabuf -> u .imp .sgt )
711
- dma_buf_unmap_attachment (attach , gntdev_dmabuf -> u .imp .sgt ,
712
- DMA_BIDIRECTIONAL );
711
+ dma_buf_unmap_attachment_unlocked (attach , gntdev_dmabuf -> u .imp .sgt ,
712
+ DMA_BIDIRECTIONAL );
713
713
dma_buf = attach -> dmabuf ;
714
714
dma_buf_detach (attach -> dmabuf , attach );
715
715
dma_buf_put (dma_buf );
0 commit comments