diff mbox series

udmabuf: actually unmap the scatterlist

Message ID 20190604202331.17482-1-l.stach@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series udmabuf: actually unmap the scatterlist | expand

Commit Message

Lucas Stach June 4, 2019, 8:23 p.m. UTC
unmap_udmabuf fails to actually unmap the scatterlist, leaving dangling
mappings around.

Fixes: fbb0de795078 (Add udmabuf misc device)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/dma-buf/udmabuf.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Gerd Hoffmann June 5, 2019, 8:42 a.m. UTC | #1
On Tue, Jun 04, 2019 at 10:23:31PM +0200, Lucas Stach wrote:
> unmap_udmabuf fails to actually unmap the scatterlist, leaving dangling
> mappings around.
> 
> Fixes: fbb0de795078 (Add udmabuf misc device)
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Pushed to drm-misc-fixes.

thanks,
  Gerd
diff mbox series

Patch

diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index cd57747286f2..9635897458a0 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf/udmabuf.c
@@ -77,6 +77,7 @@  static void unmap_udmabuf(struct dma_buf_attachment *at,
 			  struct sg_table *sg,
 			  enum dma_data_direction direction)
 {
+	dma_unmap_sg(at->dev, sg->sgl, sg->nents, direction);
 	sg_free_table(sg);
 	kfree(sg);
 }