Message ID | 20230402164826.752842-5-dmitry.osipenko@collabora.com |
---|---|
State | New |
Headers | show |
Series | Move dma-buf mmap() reservation locking down to exporters | expand |
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index a701132638cf..7e9c9ad37fd9 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -6,7 +6,6 @@ #include <linux/device.h> #include <linux/dma-buf.h> #include <linux/dma-mapping.h> -#include <linux/dma-resv.h> #include <linux/idr.h> #include <linux/list.h> #include <linux/miscdevice.h> @@ -733,8 +732,6 @@ static int fastrpc_mmap(struct dma_buf *dmabuf, struct fastrpc_buf *buf = dmabuf->priv; size_t size = vma->vm_end - vma->vm_start; - dma_resv_assert_held(dmabuf->resv); - return dma_mmap_coherent(buf->dev, vma, buf->virt, FASTRPC_PHYS(buf->phys), size); }
Don't assert held dma-buf reservation lock on memory mapping of exported buffer. We're going to change dma-buf mmap() locking policy such that exporters will have to handle the lock. The previous locking policy caused deadlock problem for DRM drivers in a case of self-imported dma-bufs, it's solved by moving the lock down to exporters. Fixes: 265751a513ad ("fastrpc: Assert held reservation lock for dma-buf mmapping") Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> --- drivers/misc/fastrpc.c | 3 --- 1 file changed, 3 deletions(-)