dma-buf: Move dma_buf_attach() to dynamic locking specification
authorDmitry Osipenko <dmitry.osipenko@collabora.com>
Mon, 17 Oct 2022 17:22:24 +0000 (20:22 +0300)
committerDmitry Osipenko <dmitry.osipenko@collabora.com>
Mon, 17 Oct 2022 22:21:50 +0000 (01:21 +0300)
commit809d9c72c2f83ef7225379908e125eb4b662232c
treedb1899ecd7aac5b1f3c509669a2783d26c582039
parent34c7797f9ef498e722dfaebf2a35b75d70d8cf64
dma-buf: Move dma_buf_attach() to dynamic locking specification

Move dma-buf attachment API functions to the dynamic locking specification
by taking the reservation lock around the mapping operations. The strict
locking convention prevents deadlock situations for dma-buf importers and
exporters.

Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-17-dmitry.osipenko@collabora.com
drivers/dma-buf/dma-buf.c