1
0
Fork 0

udmabuf: actually unmap the scatterlist

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

Fixes: fbb0de7950 ("Add udmabuf misc device")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Link: http://patchwork.freedesktop.org/patch/msgid/20190604202331.17482-1-l.stach@pengutronix.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hifive-unleashed-5.2
Lucas Stach 2019-06-04 22:23:31 +02:00 committed by Gerd Hoffmann
parent 89a4aac0ab
commit 283f1e383e
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}