Commit 283f1e38 authored by Lucas Stach's avatar Lucas Stach Committed by Gerd Hoffmann

udmabuf: actually unmap the scatterlist

unmap_udmabuf fails to actually unmap the scatterlist, leaving dangling
mappings around.

Fixes: fbb0de79 ("Add udmabuf misc device")
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Link: http://patchwork.freedesktop.org/patch/msgid/20190604202331.17482-1-l.stach@pengutronix.deSigned-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 89a4aac0
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment