]> git.baikalelectronics.ru Git - kernel.git/commitdiff
misc: fastrpc: Prepare to dynamic dma-buf locking specification
authorDmitry Osipenko <dmitry.osipenko@collabora.com>
Mon, 17 Oct 2022 17:22:19 +0000 (20:22 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Sep 2023 09:11:08 +0000 (11:11 +0200)
[ Upstream commit 791da5c7fedbc1d662445ec030d8f86872f6184c ]

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: a2cb9cd6a394 ("misc: fastrpc: Fix incorrect DMA mapping unmap request")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/misc/fastrpc.c

index 13518cac076c7c0a9ef22f8ef866ef72d2b662c5..e9291694922bc6c5c025d27e2ebd875ed5aafd8b 100644 (file)
@@ -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);
        }
@@ -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;