Commit 4fe18137 authored by Lucas Stach's avatar Lucas Stach Committed by Greg Kroah-Hartman

udmabuf: actually unmap the scatterlist

[ Upstream commit 283f1e38 ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 08f02cc9
......@@ -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