Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

udmabuf: actually unmap the scatterlist

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>
Link: http://patchwork.freedesktop.org/patch/msgid/20190604202331.17482-1-l.stach@pengutronix.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

authored by

Lucas Stach and committed by
Gerd Hoffmann
283f1e38 89a4aac0

+1
+1
drivers/dma-buf/udmabuf.c
··· 77 77 struct sg_table *sg, 78 78 enum dma_data_direction direction) 79 79 { 80 + dma_unmap_sg(at->dev, sg->sgl, sg->nents, direction); 80 81 sg_free_table(sg); 81 82 kfree(sg); 82 83 }