Skip to content

Commit

Permalink
misc: fastrpc: Prepare to dynamic dma-buf locking specification
Browse files Browse the repository at this point in the history
[ Upstream commit 791da5c ]

Prepare fastrpc to the common dynamic dma-buf locking convention by
starting to use the unlocked versions of dma-buf API functions.

Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-12-dmitry.osipenko@collabora.com
Stable-dep-of: a2cb9cd ("misc: fastrpc: Fix incorrect DMA mapping unmap request")
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
digetx authored and gregkh committed Sep 23, 2023
1 parent b4539ff commit 5a56417
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/misc/fastrpc.c
Expand Up @@ -310,8 +310,8 @@ static void fastrpc_free_map(struct kref *ref)
return;
}
}
dma_buf_unmap_attachment(map->attach, map->table,
DMA_BIDIRECTIONAL);
dma_buf_unmap_attachment_unlocked(map->attach, map->table,
DMA_BIDIRECTIONAL);
dma_buf_detach(map->buf, map->attach);
dma_buf_put(map->buf);
}
Expand Down Expand Up @@ -736,7 +736,7 @@ static int fastrpc_map_create(struct fastrpc_user *fl, int fd,
goto attach_err;
}

map->table = dma_buf_map_attachment(map->attach, DMA_BIDIRECTIONAL);
map->table = dma_buf_map_attachment_unlocked(map->attach, DMA_BIDIRECTIONAL);
if (IS_ERR(map->table)) {
err = PTR_ERR(map->table);
goto map_err;
Expand Down

0 comments on commit 5a56417

Please sign in to comment.