gntdev_dmabuf->u.imp.attach = attach;
 
-       sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL);
+       sgt = dma_buf_map_attachment_unlocked(attach, DMA_BIDIRECTIONAL);
        if (IS_ERR(sgt)) {
                ret = ERR_CAST(sgt);
                goto fail_detach;
 fail_end_access:
        dmabuf_imp_end_foreign_access(gntdev_dmabuf->u.imp.refs, count);
 fail_unmap:
-       dma_buf_unmap_attachment(attach, sgt, DMA_BIDIRECTIONAL);
+       dma_buf_unmap_attachment_unlocked(attach, sgt, DMA_BIDIRECTIONAL);
 fail_detach:
        dma_buf_detach(dma_buf, attach);
 fail_free_obj:
        attach = gntdev_dmabuf->u.imp.attach;
 
        if (gntdev_dmabuf->u.imp.sgt)
-               dma_buf_unmap_attachment(attach, gntdev_dmabuf->u.imp.sgt,
-                                        DMA_BIDIRECTIONAL);
+               dma_buf_unmap_attachment_unlocked(attach, gntdev_dmabuf->u.imp.sgt,
+                                                 DMA_BIDIRECTIONAL);
        dma_buf = attach->dmabuf;
        dma_buf_detach(attach->dmabuf, attach);
        dma_buf_put(dma_buf);